class CheckboxSelectMultiple
[source]
Similar to SelectMultiple
, but rendered as a list of check buttons:
<ul> <li><input type='checkbox' name='...' ></li> ... </ul>
The outer <ul>
container receives the id
attribute of the widget, if defined, or BoundField.auto_id
otherwise.
Like RadioSelect
, you can loop over the individual checkboxes for the widget’s choices. Unlike RadioSelect
, the checkboxes won’t include the required
HTML attribute if the field is required because browser validation would require all checkboxes to be checked instead of at least one.
When looping over the checkboxes, the label
and input
tags include for
and id
attributes, respectively. Each checkbox has an id_for_label
attribute to output the element’s ID.
Please login to continue.