Link to home
Start Free TrialLog in
Avatar of SGARLINGE
SGARLINGE

asked on

Contact Form - Field Validation

Hi,

I have created a contact form using HTML - I have validated the fields using the VALIDATION feature in Adobe Dreamweaver - but it doesn't appear to work.  The website seems to ignore the validation.  

I enclose the code below;-

Many thanks.

Steve.
<fieldset>
<legend>Contact Form</legend>
<p>* = Required Field</p>
<p>
  <label>Name:*</label>
  <br />
  <input name="Name" type="text" id="Name" onblur="MM_validateForm('Name','','R');return document.MM_returnValue" />
  <br />
<label>Email:*</label><br />
<input name="Email" type="text" id="Email" onblur="MM_validateForm('Email','','RisEmail');return document.MM_returnValue" />
<br />
<label>Telephone:</label><br />
<input name="Tele" type="text" id="Tele" onblur="MM_validateForm('Tele','','NisNum','Subject','','R','Message','','R');return document.MM_returnValue" />
<br />
<label>Website:</label><br />
<input name="Website" type="text" />
<br />
</fieldset>
<fieldset>
<legend>Contact Message</legend>
<label>Subject:</label>
*<br />
<input name="Subject" type="text" id="Subject" />
<br />
<label>Message:</label>
*<br />
<textarea name="Message" cols="50" rows="10" id="Message"></textarea>
</p>
  
  <input type="submit" name="Submit" id="Submit" value="Submit" onblur="MM_validateForm('Name','','R','Email','','RisEmail','Tele','','NisNum','Subject','','R','Message','','R');return document.MM_returnValue"/>
 </fieldset>

Open in new window

Avatar of lazypeople
lazypeople
Flag of United Kingdom of Great Britain and Northern Ireland image

Hey i see that you are calling javascript functions but i dont see any attached javascript functions to call. If this is the full document the reason it isnt working is because there are no functions to call.

Thanks
Ben
Avatar of SGARLINGE
SGARLINGE

ASKER

Oh I see.  I just did what Adobe Dreamweaver said to do- which was click on my field, click on Validate form and select paramaters.  Surely it would insert the script if its a feature of the program.

What script would I need ?
ASKER CERTIFIED SOLUTION
Avatar of lazypeople
lazypeople
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It should be in the original code or it is attached further up in your code. as i cannot see any opening html tags

thanks
ben