{% if field.is_hidden %}
    {{ field }}
{% else %}
    {% comment %}
         Make the field widget type available to templates so we can
         mark-up checkboxes differently to other widgets.
    {% endcomment %}
    {% block control_group %}

        {% if not layout %}
            <div class="row {% if field.errors %}invalid-form-field{% endif %}">
        {% endif %}
        {% block controls %}
            <div class="{%if column %}col-sm-12 col-md-{{column}}{% endif %}{%if not inline %} col{% endif %}">
                <div class="form-group">
                    {% block widget %}
                        {# checkbox or radio #}
                        <div class="form-check">
                        {% if form_display == 'tabular' %}
                            {% include "arctic/partials/form_field_parts/form_field_tabular.html" %}
                        {% elif form_display == 'float-label' %}
                            {% include "arctic/partials/form_field_parts/form_field_float.html" %}
                        {% else %}
                            {# default #}
                            {% include "arctic/partials/form_field_parts/form_field_stacked.html" %}
                        {% endif %}
                        </div>
                    {% endblock %}

                    {% block errors %}
                        {% for error in field.errors %}
                            <span class="invalid-feedback">
                                {{ error }}
                            </span>
                        {% endfor %}
                    {% endblock %}

                    {% block help_text %}
                        {% if field.help_text %}
                            <div class='help-text'>
                                {# We allow HTML within form help fields #}
                                {{ field.help_text|safe }}
                            </div>
                        {% endif %}
                    {% endblock %}
                </div>
            </div>
            {% endblock %}

            {% if not layout %}
                    </div>
            {% endif %}
        {% endblock %}
{% endif %}
