{% for field in fields %}
    {% if field.hidden %}
        {{ field.bound }}
    {% else %}
        <div class="form-group {{ field.classes }}">
            {% if field.label_first %}<label for="{{ field.bound.id_for_label }}" class="{{ field.bound.label_classes }}">{{ field.label }}</label>{% endif %}
            {% if field.errors %}
                <div class="alert alert-danger" role="alert">
                    {{ field.errors }}
                </div>
            {% endif %}
            {{ field.bound }}
            {% if field.label_last %}<label for="{{ field.bound.id_for_label }}" class="{{ field.label_classes }}">{{ field.label }}</label>{% endif %}
        </div>
    {% endif %}
{% endfor %}

{% if form_errors %}
    <div class="alert alert-danger" role="alert">
        {{ form_errors }}
    </div>
{% endif %}
