{% extends "base.html" %} {% block title %}{{ form.title }} · {{ appearance.name }}{% endblock %} {% block scripts %}{% endblock %} {% block content %}

← {{ _('All forms') }}

{{ form.title }}

{% if form.is_template %} {{ _('Template') }} {% else %} {{ _(status_names[state]) }} {% endif %}
{% set is_owner = request.state.form_level >= 3 %} {% set is_creator = user.role in ('admin', 'creator') %} {% if error %}{% endif %} {% if overbooked %}

{{ _('More places are booked than available:') }} {{ overbooked | join('; ') }}

{% endif %}
{{ _('Settings') }} {{ _('Live preview') }} {% if not form.is_template %} {{ _('Answers') }} ({{ responses }}) {% endif %} {% if is_owner %}{{ _('Team') }}{% endif %} {% if request.state.form_level >= 2 %}{{ _('History') }}{% endif %} {% if not form.is_template %}{{ _('Follow-up emails') }}{% endif %} {% if form.comments_mode != 'off' and not form.is_template %}{{ _('Comments') }}{% if pending_comments %} ({{ ngettext('%(num)d new', '%(num)d new', pending_comments) }}){% endif %}{% endif %} {% if is_creator %}
{{ csrf_field(request) }}
{% if not form.is_template %}
{{ csrf_field(request) }}
{% endif %} {% endif %} {% if form.is_template %} {% if is_owner %}
{{ csrf_field(request) }}
{% endif %} {% else %}
{{ csrf_field(request) }} {% if form.status == 'draft' %} {% elif form.status == 'open' %} {% else %} {% endif %}
{% endif %}
{{ _('Who may fill in') }}
{{ _(access_names[form.access]) }}
{% if form.opens_at %}
{{ _('Opens') }}
{{ form.opens_at | datetime }}
{% endif %} {% if form.closes_at %}
{{ _('Closes') }}
{{ form.closes_at | datetime }}
{% endif %}
{{ _('Link') }}
{% if form.status == 'draft' %} {{ _('Available after publishing.') }} {% else %} {{ link }} {% endif %}
{% if embed_allowed and form.status != 'draft' %}
{{ _('Embed') }}
<iframe src="{{ link }}?embed=1" title="{{ form.title }}" width="100%" height="800"></iframe>

{{ _('Only on pages that the administrator has allowed for embedding and that belong to the same domain (e.g. the Nextcloud). Elsewhere, browsers block the cookies the form needs: link to the form there instead.') }}

{% endif %}

{{ _('Questions') }}

{% if not form.questions %}

{{ _('No questions yet. Add the first one below.') }}

{% endif %}

    {% for q in form.questions %}
  1. {{ _(types[q.type].label) }} {% if q.required and q.id not in required_by_group %}{{ _('required') }}{% endif %} {% if q.personal %}{{ _('personal data') }}{% endif %} {% set qm = q.config.get('media') or {} %} {% if qm.kind == 'images' %}{{ _('Images') }}{% elif qm.kind in ('video', 'embed') %}{{ _('Video') }}{% endif %} {% if q.config.get('display') == 'images' %}{{ _('Image tiles') }}{% endif %} {% if dependents.get(q.id) %}{{ ngettext('controls %(num)d condition', 'controls %(num)d conditions', dependents[q.id]) }}{% endif %}
    {{ q.label or '—' }}
    {% if q.type == 'question_group' %} {% set members = group_members.get(q.id) or [] %} {% set kind = q.config.get('member_type') or 'slots' %}
    {{ _(member_types.get(kind, '')) }} · {{ ngettext('%(num)d question', '%(num)d questions', members | length) }} {%- if q.config.get('min_select') %} · {{ _('at least %(n)s required', n=q.config.min_select) }}{% endif %} {%- if q.config.get('max_select') %} · {{ _('at most %(n)s selectable', n=q.config.max_select) }}{% endif %} {% if not members %}
    {{ _('No questions yet: add questions of this type directly below the group.') }}{% endif %}
    {% endif %} {% set summary = summaries.get(q.id) %} {% if summary %}
    {{ summary.head }}
      {% for line in summary.lines %}
    • {{ line }}
    • {% endfor %}
    {% if q.type == 'page_break' %}{{ _('Applies to the whole page.') }}{% elif q.type == 'heading' %}{{ _('Applies to the whole section up to the next heading or page.') }}{% elif q.type == 'question_group' %}{{ _('Applies to all questions of the group.') }}{% endif %}
    {% endif %}
    {{ _('Edit') }} {% if q.type == 'question_group' %} {{ _('Add question to group') }} {% endif %} {% if not loop.first %}
    {{ csrf_field(request) }}
    {% endif %} {% if not loop.last %}
    {{ csrf_field(request) }}
    {% endif %}
  2. {% endfor %}

{{ _('Questions that should appear only in certain cases (e.g. “How many people?” only after “Yes”): add the question, open it with “Edit” and set the rule under “Condition” at the bottom. The condition always belongs to the question that appears or disappears.') }}

{% endblock %}