html5 - HTML 5 Is it possible to use the property required, just to make the user check one of the checkboxes, not them all? -


i'm creating form contains multiple checkboxes. problem facing is: when use property "required" in checkboxes, if user check 1 of them, of others alert " must select checkbox".

is there anyway, can make property "required" check if user has checked @ least 1 of checkboxes?

regards,

otacon.

if want require user select @ least 1 (but maybe more one) of group of checkboxes, have use javascript enforce that. can't accomplish required property.

if want require 1 item selected, can use radio group no initial selection , set required. but, doesn't work quite same way checkboxes in can't select more one.

a little less intuitive user use multiselect list user can select 1 or more items. haven't tried "required" on that, presumably selection in list (one or more) meet "required" criteria.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -