{% load bootstrap %}
{# Errors use `invalid-feedback d-block` rather than plain `invalid-feedback`: #}
{# the latter only becomes visible as a sibling of an .is-invalid control, and #}
{# radio and checkbox groups do not satisfy that selector. #}
{% if field|is_checkbox %}
{{ field }}
{% if field.auto_id %}
{% endif %}
{% for error in field.errors %}
{{ error }}
{% endfor %}
{% if field.help_text %}
{{ field.help_text|safe }}
{% endif %}
{% elif field|is_radio %}
{% if field.auto_id %}
{% endif %}
{% for choice in field %}
{{ choice.tag }}
{% endfor %}
{% for error in field.errors %}
{{ error }}
{% endfor %}
{% if field.help_text %}
{{ field.help_text|safe }}
{% endif %}
{% else %}
{% if field.auto_id %}
{% endif %}
{{ field }}
{% for error in field.errors %}