25
rated 0 times
[
29]
[
4]
/ answers: 1 / hits: 25704
/ 10 Years ago, fri, march 21, 2014, 12:00:00
i'm triyng to validate a form.
In this form you've to choose at least one element by checkboxes, and I can't be sure about their quantity (it depends by elements number).
I need to enable the submit input if one or more checkboxes are checked, and disable it if there aren't any checkbox checked, how can I do?
Here's my code:
<form id=booking>
<input type=checkbox name=room1 class=roomselect/>
<input type=checkbox name=room2 class=roomselect/>
<input type=checkbox name=room3 class=roomselect/>
<input type=submit value=Request id=subm />
</form>
More From » jquery