{{ errors }}
{% if errors and not fields %}
<p>{% for field in hidden_fields %}{{ field }}{% endfor %}</p>
{% endif %}
{% for field, errors in fields %}
<div class="field">
  {% if field.label %}{{field.label_tag}}{% endif %}
  <div class="control">
    {{field}}
    {% if field.help_text %}
    <p class="help">{{field.help_text|safe}}</p>
    {% endif %}
    {{errors}}

    {% if forloop.last %}
    {% for field in hidden_fields %}{{ field }}{% endfor %}
    {% endif %}

  </div>
</div>
{% endfor %}
{% if not fields and not errors %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
{% endif %}
