|
|
Download Instructions Quick Start Guide Example 1 Example 2 Example 3 Modify your XHTML |
Example 1<!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 of a postcode input field. </p> <showform> <form> <!-- no attributes are required, the default attributes will be inserted --> <!-- convert to upper case --> <upper name="postcode" /> <!-- remove any spaces --> <modify name="postcode" replace="/ /" with="" /> <!-- put the space in the right place --> <modify name="postcode" replace="/(.*)([A-Z0-9]{3})$/" with="$1 $2" /> <!-- check the syntax, this allows the o to be used in place of the zero in the 3 from last character --> <alert name="postcode" regex="/[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9O][A-Z]{2}/"> <!-- The alert text can be any valid HTML, it is only displayed if the regular expression is not matched --> <p class="alert">Please enter your full postcode.</p> </alert> <p> <label for="postcode">Postcode:</label> <!-- the checkform script requires label tags to be used --> <input TYPE="text" name="postcode" id="postcode" value="" size="10" /> <!-- the checkform script requires name and id attributes to have the same value (not for radio buttons) --> </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 | ||