Index: openacs-4/packages/acs-templating/www/doc/tagref/formerror.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/formerror.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/doc/tagref/formerror.html 13 Mar 2001 22:59:27 -0000 1.1 +++ openacs-4/packages/acs-templating/www/doc/tagref/formerror.html 13 Oct 2003 14:28:43 -0000 1.2 @@ -23,7 +23,7 @@ <tr> <td>First Name</td> <td> - <formwidget id="first_name">
+ <formwidget id="first_name"> <formerror id="first_name" type="no_special_characters"> The first name may not not contain special characters such as @, $, !, %, & or #. @@ -35,6 +35,31 @@ </formtemplate> +

Another example:

+ +
+  <formtemplate id="add_user">
+  <table>
+  <tr>
+    <td>First Name</td>
+    <td>
+      <formwidget id="first_name">
+    </td>
+  </tr>
+  <formerror id="first_name">
+  <tr>
+    <td colspan="2"><font color="red">@formerror.first_name@</font></td>
+  </tr>
+  </formerror>
+  </table><br>
+  <input type=submit value="Submit">
+  </formtemplate>
+
+ +

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.

+

Notes