{% load fieldtype %} {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} {% if 0 %} {# some bs3 prototyping #}
Optie 1
Optie 2
Optie 3
FOUT! Multi check help text
{% endif %} {% for field in form.visible_fields %} {% if not fields or field.name in fields %} {# bs3 will not mark the label text / help text red on has-error #}
{% if field|fieldtype:'checkboxinput' %}
{% elif field|fieldtype:'checkboxselectmultiple' %}
{% for optionid, optionval in field.field.choices %}
{{optionval}}
{% endfor %} {% if field.errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %} {{ field.help_text }}
{# col-lg-10 #}
{# row #} {% elif field|fieldtype:'radioselect' %}
{% for optionid, optionval in field.field.choices %}
{{optionval}}
{% endfor %} {% if field.errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %} {{ field.help_text }}
{# col-lg-10 #}
{# row #} {% else %}
{# class=form-control moet op input element zelf #}
{{ field|addcss:"form-control" }} {% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% if field.errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %}
{# form-group #} {% endif %}
{# if error #} {% endif %} {% endfor %}