O'Reilly logo

Dreamweaver in a Nutshell by Bruce A. Epstein, Heather Williamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Validate Form behavior parameters

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required