but when i inserted in my php form it doesnt works fine.
In this tutorial, our concern is to get values of multiple checked checkboxes using PHP as follows: To get value of a checked checkbox : In our example, there is a form contains some checkboxes, User checks them and when he/she hits submit button, multiple values of checkboxes will be display.
I'm trying to validate a form using the validate plugin for jquery.
I want to require that the user check at least one checkbox in a group in order for the form to be submitted.
actually u have mentioned function name as function validate(f). i inserted one field [gender] which has two radio buton options male and female. the validation applied is if(f['gender'].checked == false) || (f['gender'].checked == false); why is it not working.
i think because of that (f) my other validation code is not working. if i comment the gender field validation then everything works fine. With a pair of radio buttons, one will always be false, and there is no gender or gender. Even in PHP, with radio button groups, only the value of the checked radio button is passed, that's why they can all have the same name with no .
if one checkbox is selected then the form will get submit.
now i want that user should select atleast 4 checkboxes.
But in a case like that, it should be worded as a preference, not as a declaration of gender, for example: You can always ask a person's gender though, it just cannot be required for submission, and therefore should not be validated unless it is a preference, rather than a declaration.Tags: Adult Dating, affair dating, sex dating