summaryrefslogtreecommitdiffstats
path: root/templates/w3/betterform.html
blob: 4516291ae9b58b8a60c1e496de000d880f0e1c6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{% for fieldset in form.fieldsets %}
    <fieldset class="fieldset-{{ forloop.counter }} {{ fieldset.classes }}">
        {% if fieldset.legend %}
            <legend>{{ fieldset.legend }}</legend>
        {% endif %}

        {% if fieldset.description %}
            <p class="description">{{ fieldset.description }}</p>
        {% endif %}

        {% for field in fieldset %}
            {% if field.is_hidden %}
                {{ field }}
            {% else %}
                {% include "w3/field.html" %}
            {% endif %}
        {% endfor %}
    {% if not forloop.last or not fieldset_open %}
        </fieldset>
    {% endif %}
{% endfor %}