I'm trying to add a checkbox to the Registration form.
In registration.html.php I added the following:
*
THIS IS A TEST FOR THE AGREEMENT TERMS
to see if I can add text.
In the field validation section I added:
} else if ((form.password.value != "") && (form.password.value != form.password2.value)){
alert( "" );
} else if (r.exec(form.password.value)) {
alert( "" );
} else if (form.inputbox.IAgree.value == "yes") {
alert( "" );
} else {
form.submit();
}
}
My Fireworks error consule says "form.inputbox has no properties" and highlights this line:
} else if (form.inputbox.IAgree.value = = "yes") {
Can someone help me with this please ... this feature is very important for my site.
Thanks.
Adding Checkbox to Registration Form -- Almost there !!!
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Adding Checkbox to Registration Form -- Almost there !!!
Last edited by dee_jay on Tue Oct 16, 2007 3:51 pm, edited 1 time in total.
Re: Adding Checkbox to Registration Form -- Almost there !!!
I've made some progress ...
I changed the validation code to:
} else if (form.IAgree.value == "yes") {
alert( "" );
This got rid of the error message I indicated above.
Now, the problem is that when I check the box, I still get the alert "Please check the I AGREE checkbox" and the form will not submit.
Any help greatly appreciated.
I changed the validation code to:
} else if (form.IAgree.value == "yes") {
alert( "" );
This got rid of the error message I indicated above.
Now, the problem is that when I check the box, I still get the alert "Please check the I AGREE checkbox" and the form will not submit.
Any help greatly appreciated.
Re: Adding Checkbox to Registration Form -- Solved
I modified the validation code to:
} else if (form.IAgree.checked == false) {
alert( "" );
It now works fine.
} else if (form.IAgree.checked == false) {
alert( "" );
It now works fine.
