{% load django_spire_form_widget_tweaks %} {% if field.is_hidden %} {{ field }} {% elif field.field.widget.input_type == 'checkbox' %}
{{ field|add_class:"form-check-input"|attr:"role:switch" }}
{% elif field.field.widget.input_type == 'radio' %}
{{ field|add_class:"form-check-input" }}
{% else %} {{ field|add_class:"form-control" }} {% endif %} {% if not field.is_hidden %} {% if field.errors %}
{{ field.errors }}
{% endif %} {% endif %}