{% if field.is_hidden %} {{ field }} {% else %}{% spaceless %} {% if is_list_choices %} {% if as_list %} {% if field.label %} {{ field.label|safe }}{% if field.field.required %}*{% endif %} {% endif %} {{ field }} {% else %}
{% if field.label %} {{ field.label|safe }}{% if field.field.required %}*{% endif %} {% endif %} {% for option in field %} {{ option }} {% endfor %}
{% endif %} {% elif field.label %} {% if is_checkbox %}
{{ field }} {% endif %} {% if is_checkbox %}
{% endif %} {% else %} {{ field }} {% endif %} {% if show_errors %} {% for error in field.errors %} {{ error }} {% endfor %} {% endif %} {% if field.help_text %} <{% if field.help_text|first == '<' %}div{% else %}p{% endif %} id="helptext_{{ field_id }}" class="help-text">{{ field.help_text|safe }} {% endif %} {% endspaceless %}{% endif %}