max number of checkboxes
-
I need to fix a maximum number of checkboxes selected (5) in a form created with Contact Form 7 . I found this code but I don’t know how to use it or where to include:
$(“#bla :checkbox”).click(function() {
if($(“#bla :checkbox:checked”).length >= 5) {
$(“#bla :checkbox:not(:checked)”).attr(“disabled”, “disabled”);
} else {
$(“#bla :checkbox”).attr(“disabled”, “”);
}
});Thanks!!!
- The topic ‘max number of checkboxes’ is closed to new replies.