stephenmcd / django-forms-builder

Let users build forms in Django admin
BSD 2-Clause "Simplified" License
691 stars 281 forks source link

Changing multiple checkboxes from "must check all" to "check at least one" #219

Closed bentimms closed 6 years ago

bentimms commented 6 years ago

When using multiple checkboxes with the field marked as "required" don't pass the "required" attribute through to the widget as it means that all the checkboxes will need to be checked to validate.

I'd say that it's rarely the case you're really expecting the user to check every one; more that you expect them to check one or more. I think you'd have to distinguish these two use cases in the drop-down menu for the field type, but in the meantime, I propose that the default be the "at least one" scenario. The side effect of this that it can't be enforced in the client-side HTML5 without using Javascript.

stephenmcd commented 6 years ago

Makes sense, thank you.