{% with classes=field.css_classes label=label|default:field.label help_text=help_text|default:field.help_text required=field.field.required %} {% if field_type == "radio" or is_checkboxmultiple %}
{{ label }}
{% for widget in field %}
{{ widget }}
{% endfor %} {% if help_text %}
{{ help_text }}
{% endif %} {% if field.errors %}
{% include "helper/forms/errors.html" with errors=field.errors %}
{% endif %}
{% elif field_type == "checkbox" %}
{{ field }} {% if help_text %}
{{ help_text }}
{% endif %} {% if field.errors %}
{% include "helper/forms/errors.html" with errors=field.errors %}
{% endif %}
{% elif label and not field.id_for_label %}
{{ label }}
{{ field }} {% if help_text %}
{{ help_text }}
{% endif %} {% if field.errors %}
{% include "helper/forms/errors.html" with errors=field.errors %}
{% endif %}
{% else %}
{% if label %} {% if field.id_for_label %} {% endif %} {% endif %}
{{ field }} {% if help_text %}
{{ help_text }}
{% endif %} {% if field.errors %}
{% include "helper/forms/errors.html" with errors=field.errors %}
{% endif %}
{% endif %} {% endwith %}