|
Forms - Working with Text Form Fields
Text form fields allow users to type in information.
There are two kinds of text form fields that can be used in a form -- text
fields and text areas. Text fields are used for small amounts of text
input; text areas are used for multiple lines of input.
In order to use a text form field, two processes must be
completed: inserting the text form field into the form and assigning a
name and initial value. This document will cover both of these processes
for the following fields:
The following links may also be helpful as you work with
form fields:
Text
Fields
Inserting a Text Field
-
Place your cursor within the form boundary where you
would like to insert the form field
For information on inserting a form boundary, refer to
Creating Forms.
-
From the Insert menu, select Form
Objects » Text Field
OR
From the Forms tab on the Insert bar, click
TEXT FIELD

A text field will appear.
-
Type any desired text before or after the text field
-
Proceed with
Assigning the Name and Initial Value
Assigning the Name and Initial Value
The name
for a text field should indicate what type of information you are
prompting the user for, or identify what question you were asking (e.g., a
text field requesting a user's name may have the name "username" which
will correspond to the value of the text field: the user's name).
The
initial value of a text field is
visible to users and will appear to the users in the text field when the
page is loaded. This text should indicate the type of response you would
like from a user (e.g., a text field prompting users to enter their names
may have the initial text "Name" displayed).
When a user submits the form, the information the user
entered in the text field will be matched with the name of that text
field. The information the form developer receives may look like this:
name: value (e.g., username: Susan)
Therefore, the name username identifies what
question was being asked and the value indicates what the user answered
for the particular question.
To assign the Name and Initial Value:
-
After inserting the text field, click it
The Text Field Properties pane appears.
- In the TextField text box, type the name for
your text field (e.g. username)
-
In the Init Val text box, type an initial value
for the text field
-
In the Char Width text box, type a width for the
text field
- In the Max Chars text box, type the maximum
number of characters you will allow users to enter
-
OPTIONAL:
If the text field is going to be used for a password field, from the
Type section, select Password
Text
Areas
Inserting a Text Area
-
Place your cursor within the form boundary where you
would like to insert the form field
For information on inserting a form boundary, refer to
Creating Forms.
-
From the Insert menu, select Form
Objects » Textarea
From the Forms tab on the Insert bar, click
TEXTAREA
A text area will appear.
-
Type any desired text before or after the text area
-
Proceed with
Assigning the Name and Initial Value
Assigning the Name and Initial Value
The name
for the text area should indicate what type of information you are
prompting the user for, or identify what question you are asking. For
example, a text area prompting users to enter a description of their
qualifications may have the name "qualifications," which will correspond
to the value of the text field, the user's entered qualifications.
The
initial value of the text area is
visible to users and appears in the text field when the page is loaded;
this text should indicate the type of response you would like from a user
(e.g., a text area prompting users to enter a description of their
qualifications may have the initial text "qualifications" displayed).
When a user submits the form, the user-supplied value of
the text area will be matched with the name of the text area. The
information the form developer receives may look like this:
name: value (e.g., qualifications: BS Degree from UW-Eau
Claire).
Therefore, the name qualifications identifies
what question was being asked and the value indicates what the user
answered for the particular question.
To assign the Name and Initial Value
-
After inserting the text area, click it
The Text Area Properties pane appears.
-
In the TextField text box, type a name for the
text area
-
In the Init Val text area, type the initial
value for the text area
-
In the Char Width text box, type a width for the
text field
NOTE:
This width does not indicate how many characters users can enter into
the text field, it indicates how many characters wide the text field
will appear on the screen.
-
In the Num Lines text box, type the height for
the text field
HINT:
This does not reflect how much the user can type in the text area, only
the height of the text field on the screen.
Wrapping Text in Text Areas
When Netscape users complete a text area,
the text does not automatically wrap. This can be disconcerting to the
user. To force the wrap for all users:
-
Select the text area by clicking it once
The Text Area Properties pane appears.
- From the Wrap pull-down list, select
Virtual
This forces the text to wrap to the next line when the user’s input
exceeds the right boundary of the text area.
|