Learn how to validate forms using Dreamweaver behaviors

Validate Forms

  1. The first step is to insert a form by clicking on Insert > Form
  2. 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.
  3. Insert a submit button by clicking on Insert > Form Objects > Button
  4. Open the behaviors window by choosing Window > Behaviors. Select the form tag and click on the ‘+’ icon in the behaviors window. Choose Validate Form
  5. 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
  6. Click on OK.
  7. Check the validation clicking on File > Preview in Browser

Leave a Reply

You must be logged in to post a comment.