FLEAT III Forms Workshop
Each form element is created by a specific HTML tag. Each tag has properties which specify things like the element's name, size, default condition, how it behaves and so on. Any HTML reference work can give you all the details on these. In this session, we will use simple examples to focus on the general principles.
A form is created by container tags (like the BODY and /BODY container tags). A typical tag to start a form looks like this:
<FORM ACTION="http://domain/path/cgi-bin/program" NAME="getInfo">
The ACTION property of the FORM tag tells the browser what to do when the user clicks the "Submit" button.This property is often the URL of a program that processes the information in the form and then returns something to the browser (for example, generates a new page based on the information processed) The ACTION property may also be an email address if the information on the form is to be simply forwarded to an email address.
The tag that ends the form looks like this:
</FORM>
In between these two tags, you can include any number of form elements, as well as any other text or HTML that you want. There are about ten different kinds of form elements:
Each element in the form has its own tag and properties. For example the HTML tag for a 1-line text field 10 characters long (say for a postal code) would look like this:
<INPUT TYPE="text" NAME="PostalCode" SIZE=10>
The TYPE property tells the browser what kind of form element you want. The NAME property identifies the element. The SIZE property tells the browser how big to make the text box (in units of characters). The resulting form element looks like this:
We'll look at a simple example: a web-based survey of computer usage.