Form Validation Using Dreamweaver

Posted: March 15, 2012 in Web Designing

In this tutorial shows you how to validate form using Macromedia Dreamweaver, it will show alert box when someone press submit button and forgot to fill your required fields.

Open Dreamweaver and create singup form

############### Code
<table width=”350″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td><form action=”” method=”post” name=”form1″>
<table width=”350″ border=”0″ cellspacing=”5″ cellpadding=”0″>
<tr>
<td width=”105″>Full Name</td>
<td width=”16″>:</td>
<td width=”222″><input name=”fullname” type=”text” id=”fullname”>
* </td>
</tr>
<tr>
<td>E-mail</td>
<td>:</td>
<td><input name=”email” type=”text” id=”email”>
* </td>
</tr>
<tr>
<td>Phone number </td>
<td>:</td>
<td><input name=”phone_number” type=”text” id=”phone_number”>
* </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type=”submit” name=”Submit” value=”Submit”>
</td>
</tr>
</table>
</form></td>
</tr>
</table>
Select Form tag
Click on table and you will see form tag appeared then click to select it
Open tag inspector panel (Press F9)
At your panel bar open your tag inspector panel (press F9 or window > Tag Inapector)
Select tab “Behaviors”
Select onSubmit
Click on a plus sign then select “Validate Form”
Validate form

In this step in Name fields box select what field you don’t want to be blank then tick “Required” and choose what you accept.
Test in your web browser
Press submit button without insert any value in form fields you will see this alert box.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s