Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Form Validation
Your Ad Here

Form Validation


Dreamweaver MX.

1. First create a new page and save it as form.html

Go to and Insert > Form and after insterting from, point your cursor inside the Form field and go to Insert > Table and enter the values as shown below. Then click OK

image 1

2. After inserting table, type on the left side Name in first row, Email in the second, and Comments in the third row. On the right side insert text field to every row.

image 2

3. Select the first text field in the first row and give it a name of Name in the properties field, it should be single line.

image 3

Select the second text field in the second row and give it a name of Email, it shouldbe sinle line too. Now for the third one, give it a name of Comments and instead of single line choose multi line. After the Comments text field insert a Submit button.

4. Now go to Window > Behaviors

image 4

Now select the Submit button and click on the + on the Behaviors toolbar and Select Validate Form

image 5

5. Now from the pop up window select Email and choose Required checkbox and Email Address radio button. For the Comments just choose Required check box with Anything radio button.

image 6

Click OK

6. Save your file and open it in browser, F12. Now test it, try to submit without filling up anything, try to enter email without @ sign...etc.

You can view the form.html [here]



Author's URL: Ades Tynyshov
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Form Validation"

Only registered users can write comment

No comments yet...