University of Melbourne home page
 
Table of Contents

Form

The form tag defines the boundary of all form controls.

Syntax

<form action="your-script-url">
... the content of your form ...
</form>

Sample

To use the standard form style sheet requires at least two steps.

  1. embed a link to the style sheet in the head of the page
    <link rel="stylesheet" href="http://www.unimelb.edu.au/template-assets/07/styles/contentform.css" type="text/css" media="screen" />
  2. add a class to the form tag
    <form action="your-script-url" class="contentform">
    ...
    </form>

Validation

To enable validation for the form you need to:

  1. Add a link to the validation script in the head of your page.
    <script language="JavaScript" type="text/javascript" src="http://www.unimelb.edu.au/template-assets/07/js/form_validate.js"></script>
  2. Add a class of validate to the form tag
    <form action="your-script-url" class="contentform validate">
    ...
    </form>

More information on the form validation javascript.

 
html/forms/library/form.txt · Last modified: 2007/05/24 13:36 by aharris
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki