Forum Moderators: open

Message Too Old, No Replies

script to request acceptance of terms overides data input validation

input validation no longer works after adding script to ensure acceptance

         

mcrides

6:29 am on Apr 22, 2005 (gmt 0)

10+ Year Member



Can someone please throw some light my way.

I've developped a form that requires data input validation as well as accepting terms before submitting.

Data input validation worked well. Then I added some Java script to require aceptance. Now that works well, but the form no longer requires data input validation. I checked the code. It looks good to me. It just seems like the <accepatance> script overides the input validation code.

I've made up a rudimentary working form to troubleshoot with.
[touringsmart.com...]

Anyone have any thoughts?

I appreciate any input!

Bernard Marx

7:49 am on Apr 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure what's going on here. You appear to have 2 forms
- One has the fields, and calls the validator function at onsubmit
- One has the checkbox and the submit button, and calls checkCheckBox at onsubmit

If I understand correctly, you need to
- combine the 2 forms into one,
- and combine the two functions, or try: onsubmit="return validFn(this) && checkBoxFn(this);"