+ 3
Is it possible to make a one checkbox in a set of "checkboxes" (like selecting the age) required in html ?
Since I came across a required drop-down list, I was wondering if I can apply the same thing on "checkboxes" !
5 Respuestas
+ 2
Try reading this. I think this is what you want: https://stackoverflow.com/questions/6218494/using-the-html5-required-attribute-for-a-group-of-checkboxes
+ 6
Yes it's possble but we seldom hide a list of checkboxes in a single control as it's not really user-friendly as we need another tab to expand the selection.
Generally, we use checkbox for less than 5 options and dropdown list in any other cases. 😉
+ 3
Well let's say you want your clients select their gender, and you don't want them to submit the form without filling the gender option, in that case how can we make this field required ?
i hope you understand what i mean.
+ 2
<input type="checkbox" required>
You can make one or any required, but you'll have to use JavaScript to make "AT LEAST" one out of all of them required.
+ 2
oh i see! tnx a lot 😊