{% macro standard_input(field, style=None) %} {% endmacro %} {% macro input_group(field) %} {% if field.pre_units or field.units %}
{% endif %} {% if field.pre_units %} {% if field.style == styles.BOOTSTRAP_3 %} {{ field.pre_units }} {% elif field.style == styles.BOOTSTRAP_4 %}
{{ field.pre_units }}
{% endif %} {% endif %} {{ caller() }} {% if field.units %} {% if field.style == styles.BOOTSTRAP_3 %} {{ field.units }} {% elif field.style == styles.BOOTSTRAP_4 %}
{{ field.units }}
{% endif %} {% endif %} {% if field.pre_units or field.units %}
{# Hack for validation message to appear properly #} {% if field.style == styles.BOOTSTRAP_4 and field.error %} {% endif %} {% endif %} {% endmacro %} {% macro standard_label(field) %} {% if field.label_width > 0 %} {% endif %} {% endmacro %} {% macro standard_error(field) %} {{ bs3_error(field) }} {% endmacro %} {% macro bs3_error(field) %} {% if field.error and field.style == styles.BOOTSTRAP_3 %}

{# This invisible label pushed the validation message to be in line with the input #} {% if field.form.form_type == formtype.INLINE %} {{ standard_label(field) }} {% endif %} {{ field.error }}

{% endif %} {% endmacro %} {% macro bs4_error(field) %} {% if field.error and field.style == styles.BOOTSTRAP_4 %}
{{ field.error }}
{% endif %} {% endmacro %} {% macro bs3_help_text(field) %} {% if field.help_text and field.style == styles.BOOTSTRAP_3 %}

{{ field.help_text }}

{% endif %} {% endmacro %} {% macro bs4_help_text(field) %} {% if field.help_text and field.style == styles.BOOTSTRAP_4 %} {{ field.help_text }} {% endif %} {% endmacro %} {% macro standard_help_text(field) %} {{ bs3_help_text(field) }} {{ bs4_help_text(field) }} {% endmacro %}