Form Validation Using Dreamweaver

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 requied fields.

STEP1: 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>

STEP2: Select Form Tag

Click on table and you will see form tag appeared then click to select it

STEP3: 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"

STEP4: 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.

STEP5: Test in web browser

Press submit button without insert any value in form fields you will see this alert box.

Similar Post

Creating a simple PHP forum tutorial

Learn to create forum step by step, in this tutorials use only simple php code but powerful.

PHP Limit upload file size

This upload form can limit file size.