Fill-Out Forms Quick Guide


This page is adapted from the NCSA Forms Guide:
http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html

See also Forms on web.mit.edu
If you need help with forms at MIT, send email to cwis-help@mit.edu.

The FORM Tag

The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a single document, but forms cannot be nested.
<FORM METHOD="POST" ACTION="url"> 
... 
</FORM> 
Inside a FORM you can have anything except another FORM. Specifically, INPUT, SELECT, and TEXTAREA tags are used to specify interface elements within the form.

The INPUT Tag

The INPUT tag is used to specify a simple input element inside a FORM. It is a standalone tag; it does not surround anything and there is no terminating tag.

The attributes to INPUT are as follows:

The SELECT Tag

Inside <FORM> ... </FORM>, any number of SELECT tags are allowed, freely intermixed with other HTML elements (including INPUT and TEXTAREA elements) and text (but not additional forms). In Mosaic for X, SELECT tags are instantiated as Motif option menus and scrolled lists.

Unlike INPUT, SELECT has both opening and closing tags. Inside SELECT, only a sequence of OPTION tags -- each followed by an arbitrary amount of plain text (no HTML markup) -- is allowed; for example:
        <SELECT NAME="a-menu">
        <OPTION> item one
        <OPTION> item two
		 <OPTION> item three
        </SELECT>

        <SELECT NAME="a-menu" SIZE=3>
        <OPTION> item one
        <OPTION> item two
	<OPTION> item three
	etc...
        </SELECT>
The attributes to SELECT are as follows:
The attributes to OPTION are as follows:

The TEXTAREA Tag

The TEXTAREA tag can be used to place a multiline text entry field with optional default contents in a fill-out form. The attributes to TEXTAREA are as follows:
TEXTAREA fields automatically have scrollbars; any amount of text can be entered in them.

The TEXTAREA element requires both an opening and a closing tag. A TEXTAREA with no default contents looks like this:
        <TEXTAREA NAME="foo" ROWS=4 COLS=40></TEXTAREA>

Examples

Twelve examples are available. View the source for each example to see the HTML coding.


Compiled on 4/4/96 for CWIS training session.


mit Comments to cwis-help@mit.edu
$Date: 1997/06/23 11:30:34 $