{%load pgfilters%}
{%if not nocsrf%}{% csrf_token %}{%endif%} {%if form.errors %}
Please correct the errors below, and re-submit the form.
{%endif%} {% for field in form %} {% if field.is_hidden %} {{ field }} {% else %}{# not field.is_hidden #} {% if not field|ischeckbox %}
{{field|label_class:"control-label col-lg-12"}}
{% if field.errors %} {% for e in field.errors %}
{{e}}
{% endfor %} {% endif %} {{field|field_class:"form-control"}} {%if field.help_text%} {{field.help_text|safe}} {%endif%}
{% else %}{# field|ischeckbox #}
{% if not field|ismultiplecheckboxes %}
{{ field }} {%if field.help_text%} {{field.help_text|safe}} {%endif%}
{% else %} {{ field.label_tag }} {%if field.help_text%}{{field.help_text|safe}}{%endif%} {% for cb in field %}
{{ cb.tag }} {%if described_checkboxes|dictlookup:field.name%}
{{described_checkboxes|dictlookup:field.name|dictlookup:cb.data.value}}
{%endif%}
{% endfor %} {% endif %}
{% if field.errors and not field|isrequired_error %} {% for e in field.errors %}
{{e}}
{% endfor %} {% endif %}
{% endif %} {% endif %} {%endfor%}