{% load crispy_forms_filters %}
{% load l10n %}

<div class="mb-3">
{% for choice in field.field.choices %}
    <div class="flex items-start">
        <div class="flex items-center h-5">
          <input type="checkbox" class="focus:ring-pc-500 h-4 w-4 text-pc-600 border-gray-300 rounded"{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|default_if_none:""|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>
        </div>
        <div class="ml-3 text-sm">
          <label for="id_{{ field.html_name }}_{{ forloop.counter }}" class="text-gray-500">{{ choice.1|unlocalize }}</label>
        </div>
        {% if field.errors and forloop.last and not inline_class %}
            {# include 'tailwind/layout/field_errors_block.html' <-- bs4 template adds this here. Currently this pack adds it in field.html #}
        {% endif %}
    </div>
{% endfor %}
</div>
