Next / Previous / Contents / TCC Help System / NM Tech homepage

3. Text fields

To include a field where the user can type a string of characters:

<input type="text" name="fieldName" value="defaultText"
    size="width" maxlength="capacity">

where:

fieldName

is an internal name that will be passed to the downstream CGI script as the name of this element.

defaultText

specifies text that will be placed in the text field before it is filled out. This attribute is optional; the default is an empty field.

width

specifies the size of the field on the screen. For example, use size=30 for a field that occupies thirty characters' worth of space on the form. The default size is 20.

capacity

specifies the maximum number of characters that will be accepted in this field. The default is a field of unlimited capacity.