Buy Now
Sign in

validate form field susing javascript

waves , April 24 2007, 01:06
W
waves 1
April 24 2007, 01:06 #296
Hi,

I have a contact form in which I want to make a few fields required and check that email is in correct format. I would like to use
http://developer.apple.com/internet/webcontent/examples/validate_source.html
to check the fields.

I can copy this in chronofrms without the script tags, but how do I make sure that the form processes the script.

Would appreciate a step by step of what needs to go in each field in form configuration.

Thi sis how the form HTML is setup

<tr><td><b>Last Name:</b></td><td>
<input name="lname" size="40" type="text">
</td></tr>

<tr><td><b>First Name:</b></td><td>
<input name="fname" size="40" type="text">
</td></tr>

<tr><td><b>Email:</b></td><td>
<input name="email" size="40" type="text">
</td></tr>

<tr><td><b>Phone:</b></td><td>
<input name="phone" size="40" type="text">
</td></tr>

Thanks!