{# was wtf.html in Flask-Bootstrap #} {% macro form_errors(form, hiddens=True) %} {%- if form.errors %} {%- for fieldname, errors in form.errors.items() %} {%- if bootstrap_is_hidden_field(form[fieldname]) and hiddens or not bootstrap_is_hidden_field(form[fieldname]) and hiddens != 'only' %} {%- for error in errors %}
{{error}}
{%- endfor %} {%- endif %} {%- endfor %} {%- endif %} {%- endmacro %} {% macro _hz_form_wrap(horizontal_columns, form_type, add_group=False, required=False) %} {% if form_type == "horizontal" %} {% if add_group %}{{error}}
{% endcall %} {%- endfor %} {%- elif field.description -%} {% call _hz_form_wrap(horizontal_columns, form_type, required=required) %}{{field.description|safe}}
{% endcall %} {%- endif %} {%- else -%} {{field.label(class="control-label")|safe}} {% if field.type == 'FileField' %} {{field(**kwargs)|safe}} {% else %} {{field(class="form-control", **kwargs)|safe}} {% endif %} {%- if field.errors %} {%- for error in field.errors %}{{error}}
{%- endfor %} {%- elif field.description -%}{{field.description|safe}}
{%- endif %} {%- endif %}