{# One question's input(s). Expects q (SurveyQuestion), errors (set of str id), values (submitted form for re-render). #} {% set fid = 'q' ~ q.id %} {% set val = values.get(fid) if values else '' %}
{% if q.help %}

{{ q.help }}

{% endif %} {% if q.type == 'scale' %} {% set lo = q.options.get('min', 0) %}{% set hi = q.options.get('max', 5) %}
{% if q.options.get('min_label') %}{{ q.options.min_label }}{% endif %}
{% for n in range(lo, hi + 1) %} {% endfor %}
{% if q.options.get('max_label') %}{{ q.options.max_label }}{% endif %}
{% elif q.type == 'yesno' %}
{% elif q.type in ('single', 'multiple') %}
{% for c in q.options.get('choices', []) %} {% endfor %}
{% elif q.type == 'textarea' %} {% else %} {% endif %}