{{ errors }} {% if errors and not fields %}

{% for field in hidden_fields %}{{ field }}{% endfor %}

{% endif %} {% for group, fields in form.fields_by_group %}
{% if group.maskable %} {% endif %}
{% for field in fields %}
{{ field.errors }}
{% endfor %}
{% for field in fields %}
{% if field.label %}{{ field.label_tag }}{% endif %} {{ field }} {% if field.help_text %} {{ field.help_text|safe }} {% endif %}
{% endfor %}
{% endfor %} {% if not errors %} {% for field in hidden_fields %}{{ field }}{% endfor %} {% endif %}