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

5. Checkboxes

A checkbox allows the user to select on-or-off options. It displays as a small square.

<input type="checkbox" name="fieldName" value="onText" checked>

where:

fieldName

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

onText

will be passed to the downstream CGI script as the value of this field, if the user checks the box. If the box is not checked, no value will be passed on. This attribute is optional, and the default value is value="on".

checked

is an optional attribute. By default, all checkboxes are initially unchecked (off). However, if you include the checked attribute, the checkbox will be set initially.