
Chapter 20
500
Using behaviors with forms
You can attach behaviors to forms and form objects by using any of the behaviors
that appear in the Behaviors panel when the form or form object is selected. The
Validate Form and Set Text of Text Field behaviors are available only if a text field
has been inserted into the document. When attaching the Validate Form behavior
to a form object, you must specify which text field is to be validated. For example,
if you attach Validate Form to the Submit button, you might specify a text field
created for “Name” to check that the user entered text in the Name field.
When applying behaviors, you need to make sure that every form object in your
document (and every other object) has a unique name. If you use the same name
for two different objects, behaviors may not work properly—even if the objects
are in different forms.
The two form-specific behaviors are explained below. For information on other
behaviors, see “Using Behaviors” on page 435.
Validate Form
checks the contents of specified text fields to ensure that the user
has entered the correct type of data. See “Validate Form” on page 470.
Set Text of Text Field
replaces the content of a specified text field with the content
you specify. See “Set Text of Text Field” on page 464.
Summary of Contents for 38028779 - Macromedia Dreamweaver - Mac
Page 1: ...macromedia Using Dreamweaver...
Page 148: ...Chapter 4 148...
Page 296: ...Chapter 12 296...
Page 472: ...Chapter 18 472...
Page 512: ...Chapter 21 512...
Page 562: ...Appendix 562...