{% set labelname = input.label %} {% set caption = input.caption %} {% set tabindex = groupindex or 0 %} {% if input.type == 'section' %}

{{input.label}}

{% endif %} {# ------------- WRAPPER DIV FIELDS --------------- #} {% if input.type not in ('hidden','divider','section','html') %}
{# starting row wrapping div #} {% endif %} {# ------------ TEXT INPUT ------------ #} {% if input.type in ('text','password','number','tel','url','color','email','date','hidden' ) %} {% include('/form_partials/text.html') %} {# ------------- CHECKBOX FIELDS --------------- #} {% elif input.type in ('checkbox','radio') %} {% set grouped = False %} {% if input.inputs %} {% set grouped = True %} {% for choice in input.inputs %} {% include('/form_partials/checkbox.html') %} {% endfor %} {% else %} {% include('/form_partials/checkbox.html') %} {% endif %} {% if input.required %} {{input.label|title or 'This field'}} is required {% endif %} {# ------------- SELECT FIELDS --------------- #} {% elif input.type == 'select' %} {% include('/form_partials/select.html') %} {# ------------- HTML FIELDS --------------- #} {% elif input.type == 'html' %} {% include('/form_partials/html.html') %} {# ------------- TEXTAREA FIELDS --------------- #} {% elif input.type == 'textarea' %} {% include('/form_partials/textarea.html') %} {# ------------- FILE FIELDS --------------- #} {% elif input.type == 'file' %} {% include('/form_partials/file-input.html') %} {# ------------- SUBMIT BUTTON --------------- #} {% elif input.type in ('submit','button') %} {% include('/form_partials/button.html') %} {% else %} {% include('/form_partials/text.html') %} {% endif %} {% if (input.content and input.type != 'html') or caption %} {{input.content or caption}} {% endif %} {% if input.type not in ('divider','hidden','section','html') %}
{# ending row wrapping div #} {% endif %}