<div class="form-field checkbox-field">
{% if field.label %}
<fieldset class="checkbox-fieldset{% if field.error %} field-error{% endif %}">
<legend class="field-label">
{{ field.label }}
</legend>
{% for choice in choices %}
<label class="checkbox-option">
<input
type="checkbox"
name="{{ field.name }}"
id="id_{{ field.name }}_{{ loop.index0 }}"
value="{{ choice.value }}"
{% if choice.selected %}checked{% endif %}
{% for key, value in field.html_attributes %}{{ key }}="{{ value }}" {% endfor %}
{% if readonly.choice %}readonly{% endif %}
{% if disabled.choice %}disabled{% endif %}
>
<span class="checkbox-label">{{ choice.label }}</span>
</label>
{% endfor %}
</fieldset>
{% endif %}
{% if field.error %}
<span class="field-error-message">{{ field.error }}</span>
{% endif %}
</div>