Dreevoo.com | Online Learning and Knowledge Sharing
 
Home | Programs | Adobe Dreamweaver | Navigation | Specify the Validate Form behavior in Dreamweaver
Guest
Click to view your profile
Topics
Programs
Languages
Recipes
Home
Shortcuts
 
 

Specify the Validate Form behavior in Dreamweaver

The Validate Form behavior checks the contents of specified text fields to ensure that the user has entered the correct type of data.

 
  Author: bole | Version: CS5 | 5th December 2013 |  
 
 
1.
 

Open new HTML document.

 
 
2.
 

Click Forms and select Text Field.

At Input Tag Accessibility Attributes click OK and at Add form tag? click Yes.

 
 
3.
 

First input field is created. Select it.

 
 
4.
 

Under Properties at TextField write Name.

 
 
5.
 

Create new TextField and at TextField write Email.

 
 
6.
 

Click Button icon.

 
 
7.
 

You have created a basic form.

Now click on a Submit button.

 
 
8.
 

At Value field write Send. You can add any Values also for previous input fields.

 
 
9.
 

Now click <form#form1> below to select the whole form.

 
 
10.
 

Click Add behavior icon...

If you dont' see it press Shift + F4.

 
 
11.
 

...and select Validate Form.

 
 
12.
 

At Fields field select input "Name" (R). At Value field below mark Required.

 
 
13.
 

Repeat the procedure for all other forms.

In my case there is only one left.

Click OK.

 
 
14.
 

Save the document (Ctrl + S) and press F12 to see the page.

Don't enter anything just click on the button.

 
 
15.
 

Warnin window has opened, because you didn't enter anything.

 
 
16.
 

If you want to change the text of the warning click Show Code view.

 
 
17.
 

HTML and JavaScript code shows up.

Find The following error(s) occured: code and change it.

I wrote "Please enter Username and e-mail address".

 
 
18.
 

Save the document (Ctrl + S) and press F12.

You can see that the text is changed.

Also recommended:


 
 
 
   
  Please login to post a comment
   
 
 
online learning made for people
Dreevoo.com | CONTRIBUTE | FORUM | INFO