{% load widget_tweaks %}

<span class="error-block">{{ form.non_field_errors }}</span>
{% for field in form %}
    {% if field.is_hidden %}
        {{ field }}
    {% else %}
        <span class="form-group {% if field.errors %}error{% endif %}">
            <span class="mr-sm-1">{{ field.label_tag }}</span>
            {% render_field field class+="form-control mr-sm-2" %}
            {% for error in field.errors %}
                <ul class="error-block">
                    <li>{{ error }}</li>
                </ul>
            {% endfor %}
            {# No help text as it wraps #}
        </span>
    {% endif %}
{% endfor %}
