Validate Form

Team-Fly    

Macromedia® DreamWeaver® MX Unleashed
By Matthew Pizzi, Zak Ruvalcaba
Table of Contents
Chapter 19.  Behaviors


The Validate Form behavior enables you to require certain form elements to be filled out by the end user. You can specify that text fields must contain data.

Furthermore, you can specify what type of data you're looking for. You can ask for a numeric value, which would be appropriate for a ZIP Code or phone number text field. You can also ask for an email address, which will detect the @ sign in data entered into the field.

You can also require any data by checking off the Required check box in the Validate Form dialog box, as shown in Figure 19.24.

Figure 19.24. Highlight the text field you want to require data for and specify what type of data must be present in the text field.

graphics/19fig24.jpg

Unfortunately, you cannot require the end user to answer questions that use radio buttons, check boxes, drop-down menus, or select boxes.

If end users try to submit the form without filling out a required text field, they will receive an alert message specifying which form elements they must fill out.

You would normally apply the Validate Form action to the <form> tag.


    Team-Fly    
    Top


    Macromedia Dreamweaver MX Unleashed
    Macromedia Dreamweaver MX 2004 Unleashed
    ISBN: 0672326310
    EAN: 2147483647
    Year: 2002
    Pages: 321

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net