Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 488 lines (429 sloc) 7.711 kb
d0185cc @racke added purpose and description for show_label parameter
racke authored
1 __NAME__ purpose
2 display and manipulate errors stored in session
3 __END__
4
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
5 __NAME__ synopsis
6 <row>
7
8 <entry>
a800b74 @racke add name parameter, document some attributes, provide basic example for
racke authored
9 name
10 </entry>
11 <entry>
12 Yes
13 </entry>
14 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
15 Yes
a800b74 @racke add name parameter, document some attributes, provide basic example for
racke authored
16 </entry>
17 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
18 <literal>default</literal>
a800b74 @racke add name parameter, document some attributes, provide basic example for
racke authored
19 </entry>
20 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
21 Name of the error, usually corresponds to the name of a &glos-form; input
22 field in which the error ocurred.
a800b74 @racke add name parameter, document some attributes, provide basic example for
racke authored
23 </entry>
24
25 </row>
26 <row>
27
28 <entry>
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
29 overwrite
30 </entry>
31 <entry>
32 <!-- POS -->
33 </entry>
34 <entry>
35 <!-- REQ -->
36 </entry>
37 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
38 No
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
39 </entry>
40 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
41 Overwrite existing error messages for the specified
42 <literal>name</literal>? If this option is unset, the new error text
43 will be appended with the word "<literal> AND </literal>".
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
44 </entry>
45
46 </row>
47 <row>
48
49 <entry>
50 set
51 </entry>
52 <entry>
53 <!-- POS -->
54 </entry>
55 <entry>
56 <!-- REQ -->
57 </entry>
58 <entry>
59 <!-- DFL -->
60 </entry>
61 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
62 Error text to set.
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
63 </entry>
64
65 </row>
66 <row>
67
68 <entry>
69 keep
70 </entry>
71 <entry>
72 <!-- POS -->
73 </entry>
74 <entry>
75 <!-- REQ -->
76 </entry>
77 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
78 Yes
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
79 </entry>
80 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
81 Preserve the error after display? (The error is otherwise automatically
82 deleted as soon as you retrieve its value.)
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
83 </entry>
84
85 </row>
86 <row>
87
88 <entry>
89 auto
90 </entry>
91 <entry>
92 <!-- POS -->
93 </entry>
94 <entry>
95 <!-- REQ -->
96 </entry>
97 <entry>
98 <!-- DFL -->
99 </entry>
100 <entry>
101 <!-- DSC -->
102 </entry>
103
104 </row>
105 <row>
106
107 <entry>
108 all
109 </entry>
110 <entry>
111 <!-- POS -->
112 </entry>
113 <entry>
114 <!-- REQ -->
115 </entry>
116 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
117 Yes if <literal>auto</literal> is enabled
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
118 </entry>
119 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
120 Display all error messages instead of just one pointed to by
121 <literal>name</literal>?
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
122 </entry>
123
124 </row>
125 <row>
126
127 <entry>
128 show_error
129 </entry>
130 <entry>
131 <!-- POS -->
132 </entry>
133 <entry>
134 <!-- REQ -->
135 </entry>
136 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
137 Yes if <literal>auto</literal> is enabled
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
138 </entry>
139 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
140 Show actual error messages instead of just reporting their count?
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
141 </entry>
142
143 </row>
144 <row>
145
146 <entry>
147 std_label
148 </entry>
149 <entry>
150 <!-- POS -->
151 </entry>
152 <entry>
153 <!-- REQ -->
154 </entry>
155 <entry>
156 <!-- DFL -->
157 </entry>
158 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
159 <!--
160
161 H4: {{CMD[id="error_std_label"]std_label}}
162
163 std_label=<label string for error message>
164
165 used with 'required' to display a standardized
166 error format. The HTML formatting can be set
167 via the global variable MV_ERROR_STD_LABEL with
168 the default being:
169
170 > <FONT COLOR=RED>{LABEL}<SMALL><I>(%s)</I></SMALL></FONT>
171
172 where {LABEL} is what you set std_label to and %s
173 is substituted with the error message. This option
174 can not be used with the text= option.
175
176 -->
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
177 </entry>
178
179 </row>
180 <row>
181
182 <entry>
183 show_var
184 </entry>
185 <entry>
186 <!-- POS -->
187 </entry>
188 <entry>
189 <!-- REQ -->
190 </entry>
191 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
192 Yes if <literal>auto</literal> is enabled
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
193 </entry>
194 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
195 Include error name in the display?
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
196 </entry>
197
198 </row>
199 <row>
200
201 <entry>
202 joiner
203 </entry>
204 <entry>
205 <!-- POS -->
206 </entry>
207 <entry>
208 <!-- REQ -->
209 </entry>
210 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
211 <literal>&lt;li&gt;</literal> if <literal>auto</literal> is enabled,
212 a newline (<literal>\n</literal>) otherwise
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
213 </entry>
214 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
215 Join element to use if multiple errors are to be displayed at once,
216 such as when <literal>all</literal> is enabled.
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
217 </entry>
218
219 </row>
220 <row>
221
222 <entry>
223 text
224 </entry>
225 <entry>
226 <!-- POS -->
227 </entry>
228 <entry>
229 <!-- REQ -->
230 </entry>
231 <entry>
232 <!-- DFL -->
233 </entry>
234 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
235 Optional string in which the actual error message should be embedded.
236 If the literal <literal>%s</literal> is present in the string, it will be
237 substituted for the message. Otherwise the error text is just appended.
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
238 </entry>
239
240 </row>
241 <row>
242
243 <entry>
79a0ce7 @racke class, style, extra parameters added
racke authored
244 header
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
245 </entry>
246 <entry>
247 <!-- POS -->
248 </entry>
249 <entry>
250 <!-- REQ -->
251 </entry>
252 <entry>
253 <!-- DFL -->
254 </entry>
255 <entry>
256 <!-- DSC -->
257 </entry>
258
259 </row>
260 <row>
261
262 <entry>
79a0ce7 @racke class, style, extra parameters added
racke authored
263 footer
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
264 </entry>
265 <entry>
266 <!-- POS -->
267 </entry>
268 <entry>
269 <!-- REQ -->
270 </entry>
271 <entry>
272 <!-- DFL -->
273 </entry>
274 <entry>
275 <!-- DSC -->
276 </entry>
277
278 </row>
279 <row>
280
281 <entry>
79a0ce7 @racke class, style, extra parameters added
racke authored
282 list_container
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
283 </entry>
284 <entry>
285 <!-- POS -->
286 </entry>
287 <entry>
288 <!-- REQ -->
289 </entry>
290 <entry>
79a0ce7 @racke class, style, extra parameters added
racke authored
291 <literal>ul</literal>
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
292 </entry>
293 <entry>
79a0ce7 @racke class, style, extra parameters added
racke authored
294 Default list container HTML tag (applicable only if <literal>auto</literal> is enabled).
295 </entry>
296
297 </row>
298 <row>
299
300 <entry>
301 class
302 </entry>
303 <entry>
304 <!-- POS -->
305 </entry>
306 <entry>
307 <!-- REQ -->
308 </entry>
309 <entry>
310 &NODEFAULT;
311 </entry>
312 <entry>
313 CSS class name (applicable only if <literal>auto</literal> is enabled).
314 </entry>
315
316 </row>
317 <row>
318
319 <entry>
320 style
321 </entry>
322 <entry>
323 <!-- POS -->
324 </entry>
325 <entry>
326 <!-- REQ -->
327 </entry>
328 <entry>
329 &NODEFAULT;
330 </entry>
331 <entry>
332 CSS style value (applicable only if <literal>auto</literal> is enabled).
333 </entry>
334
335 </row>
336 <row>
337
338 <entry>
339 extra
340 </entry>
341 <entry>
342 <!-- POS -->
343 </entry>
344 <entry>
345 <!-- REQ -->
346 </entry>
347 <entry>
348 &NODEFAULT;
349 </entry>
350 <entry>
351 Extra HTML attributes (applicable only if <literal>auto</literal> is enabled).
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
352 </entry>
353
354 </row>
355 <row>
356
357 <entry>
358 show_label
359 </entry>
360 <entry>
361 <!-- POS -->
362 </entry>
363 <entry>
364 <!-- REQ -->
365 </entry>
366 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
367 No
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
368 </entry>
369 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
370 <!--
371 show_label=1 causes the field label set by a previous [error] tag's std_label attribute (see below) to be included as part of the error message, like this:
372 E:First Name: blank
373
374 If no std_label was set, the variable name will be used instead. This can also be used in combination with show_var to show both the label and the variable name.
375
376 show_label was added in 4.7.0.
377
378 -->
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
379 </entry>
380
381 </row>
382 <row>
383
384 <entry>
385 filter
386 </entry>
387 <entry>
388 <!-- POS -->
389 </entry>
390 <entry>
391 <!-- REQ -->
392 </entry>
393 <entry>
394 <!-- DFL -->
395 </entry>
396 <entry>
397 <!-- DSC -->
398 </entry>
399
400 </row>
401 <row>
402
403 <entry>
404 required
405 </entry>
406 <entry>
407 <!-- POS -->
408 </entry>
409 <entry>
410 <!-- REQ -->
411 </entry>
412 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
413 No
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
414 </entry>
415 <entry>
b33d64d @docelic - Small update to PageSelectField
docelic authored
416 Used for display purposes, as a hint to <literal>std_label</literal>.
417 Enabling this attribute allows the label to be printed differently for
418 required form fields. In the default label template, this means
419 <emphasis role='bold'>bold</emphasis> text, but in your custom labels
420 the behavior is, of course, arbitrary.
70a5390 @docelic Create the placeholders for almost all of the missing tag documentation
docelic authored
421 </entry>
422
423 </row>
79a0ce7 @racke class, style, extra parameters added
racke authored
424 &TAG_NON_CONTAINER;
a800b74 @racke add name parameter, document some attributes, provide basic example for
racke authored
425 __END__
426
b33d64d @docelic - Small update to PageSelectField
docelic authored
427
428 __NAME__ description
429 The &tag-__FILENAME__; tag was designed to report meaningful error
7b0f16d @racke fix typo
racke authored
430 messages to the users, should an error occur in the &glos-form; processing
b33d64d @docelic - Small update to PageSelectField
docelic authored
431 action (such as missing or invalid field values entered).
432 </para><para>
433 It can work in conjunction with the definitions set in a &glos-profile;,
434 and can generate error messages in any format you desire.
7b0f16d @racke fix typo
racke authored
435 </para><para>
436 Error conditions can also be tested with the [if] conditional:
437 <programlisting>
438 [if errors fname]
439 Please enter your first name!
440 [/if]
441 </programlisting>
b33d64d @docelic - Small update to PageSelectField
docelic authored
442 <!--
443 </para><para>
444 Generally, if the variable in question passes order profile checking,
445 the will
446 output a label, by default B<bold> text if the item is required,
447 or normal text if not (controlled by the <require> parameter. If
448 the variable fails one or more order checks, the error message
449 will be substituted into a template and the error cleared from
450 the user's session.
451
452 $Vend::Session-gt;{errors};
453 -->
454 __END__
455
37bceae @racke added see also to warnings
racke authored
456 __NAME__ example: Automatic error display
2d2d65e @docelic * Following Steven Jenkins' iccattut comments, I went over the
docelic authored
457 The following will simply display all accumulated session errors.
458 (Note that after display, session errors will be cleared and will
459 not show up on subsequent page accesses).
460 <programlisting><![CDATA[
461 <ul>
462 [error auto=1]
463 </ul>
464 ]]></programlisting>
465 __END__
466
37bceae @racke added see also to warnings
racke authored
467 __NAME__ example: Trigger an error
a800b74 @racke add name parameter, document some attributes, provide basic example for
racke authored
468 <programlisting>
469 [error name="email" set="Invalid email address"]
470 </programlisting>
471 __END__
7b0f16d @racke fix typo
racke authored
472
37bceae @racke added see also to warnings
racke authored
473 __NAME__ example: Show all errors
7b0f16d @racke fix typo
racke authored
474 <programlisting>
475 [error all=1 show_error=1]
476 </programlisting>
477 __END__
6813946 @racke see also added
racke authored
478
37bceae @racke added see also to warnings
racke authored
479 __NAME__ example: Clear all errors
480 <programlisting>
481 [tmp clear_errors][error all=1 comment="Clear errors"][/tmp]
482 </programlisting>
483 __END__
484
6813946 @racke see also added
racke authored
485 __NAME__ see also
37bceae @racke added see also to warnings
racke authored
486 warnings, CSS_CONTRAST, MV_ERROR_STD_LABEL
6813946 @racke see also added
racke authored
487 __END__
Something went wrong with that request. Please try again.