{% load bootstrap_toolkit %} {{ form.non_field_errors }} {% for field in form.hidden_fields %} {{ field }} {% endfor %} {% for field in form.visible_fields %} {% with field|bootstrap_input_type as input_type %} {% if layout == "horizontal" %} {% include "bootstrap_toolkit/field_horizontal.html" %} {% else %} {% if layout == "inline" %} {% include "bootstrap_toolkit/field_inline.html" %} {% else %} {% if layout == "search" %} {% include "bootstrap_toolkit/field_search.html" %} {% else %} {% include "bootstrap_toolkit/field_vertical.html" %} {% endif %} {% endif %} {% endif %} {% endwith %} {% endfor %}