Learn how to validate forms using Dreamweaver behaviors
Validate Forms
- The first step is to insert a form by clicking on Insert > Form
- The next step is to insert 3 text boxes for name, email and phone. Choose Insert > Form Objects > Text Field to insert 3 text boxes. Name the first text box ‘Name’, the second ‘Email’ and the third ‘Phone’ in the Properties inspector.
- Insert a submit button by clicking on Insert > Form Objects > Button
- Open the behaviors window by choosing Window > Behaviors. Select the form tag and click on the ‘+’ icon in the behaviors window. Choose Validate Form
- In the pop-up window that appears choose the text field you want to validate and select the required validation.
- Select Required for Name
- Select Email for Email Address
- Select Number for Phone
- Click on OK.
- Check the validation clicking on File > Preview in Browser

Leave a Reply
You must be logged in to post a comment.