{% if row.started_on %}
Started: {{ row.started_on.strftime('%Y-%m-%d %H:%M:%S') }}
{% if row.submitted_on %}
· Submitted: {{ row.submitted_on.strftime('%Y-%m-%d %H:%M:%S') }}
{% if row.duration_display %}
· Duration: {{ row.duration_display }}
{% endif %}
{% endif %}
{% endif %}
{% if row.data and row.data.kind == 'questionnaire' %}
Questionnaire: {{ row.data.name }}{% if row.data.tag %} · Tag: {{ row.data.tag }}{% endif %}
| Question |
Field ID |
Response |
{% for field in row.data.fields %}
| {{ field.prompt }} |
{{ field.id }} |
{% if field.value == "" or field.value is none %}
(empty)
{% else %}
{{ field.value }}
{% endif %}
|
{% endfor %}
{% if row.data.calculated %}
Calculated fields
{% for field in row.data.calculated %}
{{ field.id }} |
{{ field.value }} |
{% endfor %}
{% endif %}
{% elif row.data and row.data.kind == 'tables' %}
{% for tbl in row.data.tables %}
Table: {{ tbl.name }}
{% for section in tbl.sections %}
{% if section.filter or section.group_by %}
{% if section.filter %}Filter: {{ section.filter }}{% endif %}
{% if section.filter and section.group_by %} · {% endif %}
{% if section.group_by %}Grouped by: {{ section.group_by }}{% endif %}
{% endif %}
{% if section.error %}
Export failed: {{ section.error }}
{% else %}
{% for r in section.rows %}
{% if r.level is not none %}
| {{ r.level }} |
{% endif %}
{% for f in r.fields %}
{{ f.name }} |
{% if f.value == "" or f.value is none %}
(empty)
{% else %}
{{ f.value }}
{% endif %}
|
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% elif row.path.startswith('questionnaire/') and row.status == 'completed' %}
No response data found for this questionnaire submission.
{% endif %}