Hi,
I have multiple checkbox groups (Cities) with each having several values (Courses).
So let's say I have two checkbox groups with several courses:
[list]Brussels[list] Course Monday at 19:30 Course Monday at 20:30 [/list][/list]
[list]Brugge[list] Course Wednesday at 20:00 Course Wednesday at 21:00 [/list][/list]
I only want to make the user to choose at least ONE value of all the checkbox group. So in the example at least one (up to 4)
I just want to prevent someone to subscribe and not have selected at least one course in total.
I suspect this has to be done with own validation but I have no idea how to do it for checkbox groups.
I saw the following code in the FAQ for input fields:
Does anyone have an idea how to do it for checkbox groups?
Thanks!
I have multiple checkbox groups (Cities) with each having several values (Courses).
So let's say I have two checkbox groups with several courses:
[list]
[list]
I only want to make the user to choose at least ONE value of all the checkbox group. So in the example at least one (up to 4)
I just want to prevent someone to subscribe and not have selected at least one course in total.
I suspect this has to be done with own validation but I have no idea how to do it for checkbox groups.
I saw the following code in the FAQ for input fields:
function validateOneOf () {
var input_a, input_b;
input_a = jQuery('#phone').val().trim().length;
input_b = jQuery('#email').val().trim().length;
return ( input_a > 0 || input_b > 0 );
}
Does anyone have an idea how to do it for checkbox groups?
Thanks!