{% comment %} This subcategory assumes that the first questiongroup contains a image checkbox question where each conditionally opens a new questiongroup. The questiongroups not appearing part of the conditions are rendered normally. For this reason, the following configurations in "form_options" need to be set: - questiongroup_conditions: Must correspond to the list of "questiongroup_conditions" set in the "form_options" of the first key of the first questiongroup. {% endcomment %} {% load i18n %} {% load floppyforms %} {% load list_to_columns %} {% if config.next_level == 'subcategories' %}

{{ config.label }}

{% for sub_config, sub_formsets in formsets %} {% form form using sub_config.form_template with config=sub_config formsets=sub_formsets %} {% endfor %} {% else %}
{{ config.numbering|default:'' }} {{ config.label }} {% include "form/helptext.html" with helptext=config.helptext helptext_length=config.helptext_length %} {% for questiongroup_config, questiongroup_formset in formsets %} {% if questiongroup_config.keyword == 'tech_qg_9' or questiongroup_config.keyword == 'tech_qg_239' %}
{{ questiongroup_formset.management_form }} {% for qg_form in questiongroup_formset.forms %}
{% for field in qg_form.visible_fields %} {% endfor %} {% for field in qg_form.hidden_fields %}{% formfield field %}{% endfor %}
{% endfor %}
{% elif questiongroup_config.keyword == 'tech_qg_235' or questiongroup_config.keyword == 'tech_qg_7' or questiongroup_config.keyword == 'tech_qg_237' or questiongroup_config.keyword == 'tech_qg_238' or questiongroup_config.keyword == 'tech_qg_249' %} {% form form using questiongroup_config.template with config=questiongroup_config formset=questiongroup_formset %} {% endif %} {% endfor %}
{% endif %}