{% load i18n %} {% load form_helpers %}
{% if heading %}

{{ heading }}

{% endif %} {% for row in rows %} {% if row.layout == 'field' %} {# Single form field #} {% render_field row.items.0 %} {% elif row.layout == 'attribute' %} {# A static attribute of the form's instance #}
{{ row.items.0|linkify }}
{% elif row.layout == 'inline' %} {# Multiple form fields on the same line #}
{% for field in row.items %}
{% render_field_with_aria field has_helptext=True %}
{% trans field.label %}
{% if field.errors %} {% endif %}
{% endfor %}
{% if row.help_text %} {# Shared help text rendered beneath the entire set of inline fields #}
{{ row.help_text|safe }}
{% endif %} {% elif row.layout == 'tabs' %} {# Tabbed groups of fields #}
{% for tab in row.items %}
{% for field in tab.fields %} {% render_field field %} {% endfor %}
{% endfor %}
{% endif %} {% endfor %}