{% load static %} {% load list_to_columns %}

{{ numbering|default:'' }} {{ label }}

{% if subcategories %} {% for subcategory in subcategories %} {{ subcategory }} {% endfor %} {% else %} {% for questiongroup in questions %} {% if questiongroup.qg == 'cca_qg_129' %} {% for qg_questions in questiongroup.questions %} {% for question in qg_questions %} {{ question }} {% endfor %} {% endfor %} {% elif forloop.last and questiongroup.conditional_question == None %} {% for qg_questions in questiongroup.questions %} {% for question in qg_questions %} {{ question }} {% endfor %} {% endfor %} {% elif questiongroup.qg == 'cca_qg_130' %} {% for qg_questions in questiongroup.questions %} {% for question in qg_questions %}
{{ question.key }}
{% for value in question.values %}

{{ value.0 }}

{{ value.0 }}
{% for questiongroup_sub in questions %} {% if questiongroup_sub.conditional_question == value.3 %} {% for qg_questions_sub in questiongroup_sub.questions %} {% for question_sub in qg_questions_sub %} {{ question_sub }} {% endfor %} {% endfor %} {% endif %} {% endfor %}
{% endfor %} {% endfor %} {% endfor %} {% endif %} {% endfor %} {% endif %}