{% load crispy_forms_tags crispy_forms_field %}
{# work around because we don't render the label using crispy #}
{% if form_field|is_checkbox %}
{% if form_field.errors %}
{% crispy_field form_field 'class' 'form-check-input is-invalid ml-0 position-relative' %}
{% else %}
{% crispy_field form_field 'class' 'form-check-input ml-0 position-relative' %}
{% endif %}
{% include 'bootstrap4/layout/help_text_and_errors.html' with field=form_field form_show_errors=True only %}
{% else %}
{# fall back to crispy forms default tempalte #}
{% include "bootstrap4/field.html" with field=form_field form_show_errors=True wrapper_class="mb-0" tag=None %}
{% endif %}