{% extends "base.html" %} {% macro render_form(form, depth) %} {% for field in form %} {% if field.type == "FormField"%}
{% if field.data | length > 1 %} {{ field.label.text }} {% endif %} {{ render_form(field, depth + 1) }}
{% elif not field.type in ["CSRFTokenField", "FormField", "SubmitField"] %}
{{ field.label }} {{ field() }}
{% elif field.type in ["CSRFTokenField", "SubmitField"] %} {{ field() }} {% endif %} {% endfor %} {%- endmacro -%} {% macro render_toc(form) %} {%- endmacro -%} {% block content %}

Config

Check out the documentation for more info on these options.

{{ render_toc(conf) }}
{{ render_form(conf, 1) }}
{% endblock %}