|
|
Download Instructions Quick Start Guide Example 1 Example 2 Example 3 Modify your XHTML |
Example 3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style type="text/css"> p { font-size: 8pt; font-family: Verdana; } .alert { width: 100%; font-size: 8pt; font-family: Verdana; color:red; } </style> </head> <body> <p>This is an example using the alert group.</p> <showform> <form> <!-- no attributes are required, the default attributes will be inserted --> <p>Age</p> <alertgroup> <!-- alertgroup is used to check a number of regular expressions Only one of the regular expressions needs to match to suppress the alert output It is equivelant to logical OR If you want logical AND use alerts for each expression and repeat the alert text --> <alert name="age_18_21" regex="/^.+$/"></alert> <alert name="age_21_25" regex="/^.+$/"></alert> <alert name="age_25_30" regex="/^.+$/"></alert> <alert name="age_30_40" regex="/^.+$/"></alert> <alert name="age_40_50" regex="/^.+$/"></alert> <alert name="age_over_50" regex="/.+$/"></alert> <p class="alert">You must tick one of the age boxes.</p> </alertgroup> <p> <input type="checkbox" name="age_18_21" id="age_18_21" /> <!-- the checkform script requires name and id attributes to have the same value (not for radio buttons) --> <label for="age_18_21" >18 - 21</label><br /> <!-- the checkform script requires label tags to be used --> <input type="checkbox" name="age_21_25" id="age_21_25" /> <label for="age_21_25" >21 - 25</label><br /> <input type="checkbox" name="age_25_30" id="age_25_30" /> <label for="age_25_30" >25 - 30</label><br /> <input type="checkbox" name="age_30_40" id="age_30_40" /> <label for="age_30_40" >30 - 40</label><br /> <input type="checkbox" name="age_40_50" id="age_40_50" /> <label for="age_40_50" >40 - 50</label><br /> <input type="checkbox" name="age_over_50" id="age_over_50" /> <label for="age_over_50" >over 50</label> </p> <p><input type="submit" value="send form" /></p> </form> </showform> <reply> <p>Thankyou for completing the form.</p> <!-- The reply section can contain any valid HTML. Please remember that either the reply or showform section will be displyed in plase of the insertform tag, so make sure the HTML is correct with either! --> </reply> <insertform /> </body> </html> |
||
| For further information please contact admin@generalform.com | ||