|
Text
Entry Fields allow the User to enter non formatted,
and/or non validated text. For instance, if you
we're doing a survey, and you wanted to give the
Web Surfer the option of entering his or her name,
you could use a text entry field. The following
example shows the coding of a text entry field
within the Form.
<form
METHOD=POST ACTION="http://www.enetrics.com/cgi-bin/formmail.cgi">
<input TYPE="text"
NAME="persons-name" SIZE="40"
MAXLENGTH="40">
<input TYPE="hidden"
NAME="recipient" SIZE="40"
MAXLENGTH="40">
<input TYPE="password"
NAME="password" SIZE="10"
MAXLENGTH="10">
</form> |
The Tag is the Input Tag. The TYPE parameter identifies
the type of input field. In our case the Type
is "text" to identify a text entry field.
Other
values for the TYPE parameter are "hidden"
which tells the browser the field is not to be
displayed, and the Web Surfer cannot enter any
data into the field. This becomes handy for fields
that must be provided to the CGI program in order
for the CGI program to successfully process the
data entered in the form.
Another
input TYPE is the "password" type, which
tells the browser to echo each entry in the field
with the Asterisk (i.e*******).
The
NAME parameter provides a field name that will
be associated with the value is entered. This
is important for the CGI (Common Gateway Interface)
program to processes the data sent to it. In the
case of the formmail.cgi program, the NAME will
be used in the e-mail that is sent to your e-mail
address.
The
SIZE parameter tells the browser how large to
make the Field. This is pretty self-explanatory.
The
MAXLENGTH parameter tells the browser how many
characters maximum is allow to be entered in the
field.. You may have a SIZE of 20, and a MAXLENGTH
of 40. In this situation, the form field accepts
more data than can be displayed in the field.
The fields will simply scroll as the Web Surfer
types until the MAXLENGTH value is reached.
Beginning/Ending
Form Tags
Text
Entry Fields
Text
Area Fields
Checkboxes
Radio
Buttons
Combo
Boxes
Submit
and Reset Buttons
E-Mail
the Contents of your Form
Example
Forms |