{% load form_block %}
{% with styles=form_block.form.label_class.LabelStyle %} {% with label=labels|get_by_style:styles.VERTICAL %} {% with default_label=form_block.name|capfirst|add:':' %} {{ label.display_inline|default:default_label }} {% endwith %} {% endwith %} {% endwith %}
{% for name, field in block_fields.items %} {% if field.value %} {% if form_block.options.single %} {% with clabels=labels|get_by_choice:field.value %} {% with label=clabels|closest_label %} {% if label %} {{ label.display_inline }} {% else %} {{ field.value }} {% endif %} {% endwith %} {% endwith %} {% else %} {% if name != form_block.options.text_input %} {% with clabels=labels|get_by_choice:name %} {% with label=clabels|closest_label %} {{ label.display_inline }} {% endwith %} {% endwith %} {% else %} {{ field.value }} {% endif %} {% endif %} {% endif %} {% endfor %}