{% load form_block %}
{% for name, field in block_fields.items %} {% with flabels=labels|get_by_choice:name %} {% if name != form_block.options.text_input %}
{% if form_block.options.single %} {% include "formative/custom_block_choice.html" %} {% else %} {% include "formative/custom_block_boolean.html" with labels=flabels %} {% endif %}
{% else %}
{% if form_block.options.single %} {% unbound_radio_field form_block name as unbound_form %} {% for f in unbound_form %} {% include "formative/custom_block_choice.html" with field=f labels=None %} {% endfor %} {% else %} {% unbound_checkbox_field form_block name as unbound_form %} {% for f in unbound_form %} {% include "formative/custom_block_boolean.html" with field=f labels=None %} {% endfor %} {% endif %} {% include "formative/custom_block_text.html" with labels=flabels %}
{% endif %} {% endwith %} {% endfor %}