Implement any javascripts' fields validation code into your form mail once and you will forget about it forever as it will stay guard 24 clocks around without any problems!
i think this is misleading....
JavaScript is fine for user-friendliness - the user gets immediate feedback, but it does nothing to protect ur data because users can have js switched off and bots dont use it
always validate via PHP and use JS to make things more friendly - dont rely on JavaScript to validate form data.
u have:
Code:
<input type="hidden" name="conditions1" value=":#
#IF#yourName#yourName !~ /enter_your_name/#!#Please provide your name.#:
#TEST#emailAdd ~ /^[a-z0-9_.]+@[a-z0-9_]+\.([a-z0-9_.]+)*[a-z0-9_.]$/i #Please enter a valid email address.#:
#TEST#emailAdd=confEmail#The email addresses submitted do not match.#:
#TEST#add_1#please enter the first line of your address.#:
#TEST#postCode#please enter your postcode.#:
#TEST#telMob#You must enter a contact number.#" />
to allow hyphens:
Code:
<input type="hidden" name="conditions1" value=":#
#IF#yourName#yourName !~ /enter_your_name/#!#Please provide your name.#:
#TEST#emailAdd ~ /^[-a-z0-9_.]+@[-a-z0-9_]+\.([-a-z0-9_.]+)*[a-z0-9_.]$/i #Please enter a valid email address.#:
#TEST#emailAdd=confEmail#The email addresses submitted do not match.#:
#TEST#add_1#please enter the first line of your address.#:
#TEST#postCode#please enter your postcode.#:
#TEST#telMob#You must enter a contact number.#" />
i.e. just add a - after the [ in 3 places.
and u can use newlines to make the whole thing more readable, as above
Bookmarks