{% macro form_field(field) %} {% set with_label = kwargs.pop('with_label', False) %} {% set inline_ = '' %} {% if field.type == 'BooleanField' %}
{% elif field.type == 'RadioField' %} {% for subfield in field %}
{% endfor %} {% else %}
{% set placeholder = '' %} {% if not with_label %} {% set placeholder = field.label.text %} {% endif %} {% if with_label %} {% endif %} {% set class_ = 'form-control' %} {% if field.type == 'FileField' %} {% set class_ = class_ + ' input-file' %} {% endif %} {{ field(class_=class_, placeholder=placeholder, **kwargs) }} {% if field.errors %} {{ field.errors|join(', ') }} {% endif %} {% if field.description %}

{{ field.description|safe }}

{% endif %}
{% endif %} {% endmacro %}