{% macro render_select(field, disabled=False) -%} {# Renders selects. If there's only one choice, it hides the input. #} {% if field.iter_choices()|list|length == 1 %} {{ field.label }} {{ field(class="form-control", disabled='') }} {% else %} {{ field.label }} {% if disabled %} {{ field(class="form-control", disabled="") }} {% else %} {{ field(class="form-control") }} {% endif %} {% endif %} {%- endmacro %} {% macro render_errors(field) -%} {% if field.errors %} {% for error in field.errors %} {% if error is string %} {{ error }} {% elif error is iterable %}