{% comment %}
The questiongroup has a checkbox in front of the label of the first question.
The questions are only visible if the checkbox is checked.
{% endcomment %}
{% load i18n %}
{% load floppyforms %}
{% load list_to_columns %}
{% endif %}
{% if config.label %}
<{{ config.label_tag|default:"h4" }} class="{% if config.label_class %}{{ config.label_class }}{% endif %}">{{ config.label }}{{ config.label_tag|default:"h4" }}>
{% endif %}
{% include "form/helptext.html" with helptext=config.helptext helptext_length=config.helptext_length %}
{{ formset.management_form }}
{% include "form/errors.html" with errors=formset.non_form_errors %}
{% for qg_form in formset.forms %}
{% for field in qg_form.visible_fields %}
{% with template=config.templates|get_by_keyword:field.name options=config.options|get_by_keyword:field.name label=field.label %}
{% if template %}
{% formrow field using template %}
{% else %}
{% formrow field using "form/question/default.html" %}
{% endif %}
{% endwith %}
{% endfor %}
{% for field in qg_form.hidden_fields %}{% formfield field %}{% endfor %}