The formerror tag is used to specify the presentation -of a form validation error.
++formerror
+Templating System + : Designer Guide + : Tag Reference + : formerror +Summary
+The formerror tag is used to specify the presentation +of a form validation error.
+Usage
+<formtemplate id="add_user"> <table> <tr> @@ -22,7 +27,9 @@ </table><br> <input type="submit" value="Submit"> </formtemplate> -Another example:
++Another example:
+<formtemplate id="add_user"> <table> <tr> @@ -39,26 +46,30 @@ </table><br> <input type="submit" value="Submit"> </formtemplate> -This adds another table row which contains the error message for +
This adds another table row which contains the error message for that widget in red color. If there is no error then the table row -will not be added.
The contents of the formerror tag may appear on the +will not be added.
+The contents of the formerror tag may appear on the form when a submission is returned to the user for correction.
The contents of the tag may use the special variables -label and value to refer to the element label and -submitted value.
You can use the variable \@formerror.element_id\@ to refer to the +label and value to refer to the element label +and submitted value.
You can use the variable \@formerror.element_id\@ to refer to the automatically generated error message within the formerror -tags.
The type attribute is optional and is used to +tags.
The type attribute is optional and is used to distinguish messages for specific types of validation errors. Each element may have any number of error messages associated with it, corresponding to each of the validation checks performed by the developer in the script associated with template.
If the contents of the tag are empty (<formerror></formerror>), the message specified by the developer in the script are inserted when appropriate. This is particularly useful for international sites, where locale-dependent -messages may be stored in the database.
If the type attribute is not specified and the -contents of the tag are empty, all appropriate messages are -inserted (separated by <,br> tags).
See the formwidget and -formgroup tags for more +messages may be stored in the database.
If the type attribute is not specified and +the contents of the tag are empty, all appropriate messages are +inserted (separated by <,br> tags).
See the formwidget and +formgroup tags for more information on writing the body of a dynamic form template.