Using Form Controls
The Validate Form, Jump Menu, and Jump Menu Go behaviors are used with forms, as first discussed in Chapter 3.
Form Validation
The Validate Form behavior validates the
type of data entered in form text fields (to use this
behavior, the document must contain at least one form with at least
one text field). Typically, you’ll attach the behavior to the
form’s Submit button and trigger it using the
onClick
event (which is the same as attaching it
to the Form itself and triggering it with the
onSubmit
action).
Applying the behavior in the Behaviors panel opens the Validate Form dialog box, shown in Figure 16-3.
Figure 16-3. Validate Form behavior parameters
Table 16-2 explains the options in the Validate
Form dialog box. The Notation column lists the abbreviations shown
after each text field in the Named Fields list, which indicate the
validation settings for that field. For example, the notation
(RisMail
) indicates a required email address and
(NinRange3:10
) indicates an optional number
between 3 and 10.
Table 16-2. Validate Form options
Control |
Definition |
Notation |
---|---|---|
Named Fields |
This field displays a scrolling list of text fields in the form. Highlight a text field from the list and set the remaining options. You can validate multiple text fields with one instance of the behavior. |
N/A |
Required |
Enable this checkbox to force the user to enter a value for the text ... |
Get Dreamweaver in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.