I have a form where users should answer questions through checkboxes. There are very few checkboxes, and I use AngularJS in the form to check it out. The main check is to fill in all the required fields.
Below is my sample code:
<input type="checkbox" name="skills"> IT <input type="checkbox" name="skills"> Design <input type="checkbox" name="skills"> Photoshop <input type="checkbox" name="skills"> Writing
Now I want the checkboxes to be required, so from the “skills” checkboxes the user at least checks 1 field .
I tried putting the required
tag, but it doesn't seem to work.
Im using AngularJS to validate my form so
<button ng-disabled="myForm.$invalid">Submit</button>
Any idea how I can fix this? If you can work, that's great.
source share