Published
November 23, 2022
Updated
Scenario, your form has some checkboxes, and you require that at least one of them be checked before the form can be submitted.
Solution
Here's a Codepen showing the code you need.
Please this in the </body> custom code area of the page(s) you have your form on.
Key points;
- Give your form a unique ID, in this case, we used myForm in the script.
- Wrap your checkboxes in a DIV, and give it an ID as well, here we called it chkGroup.
FAQs
Answers to frequently asked questions.