{% if form.non_field_errors %}
    <ul class="messages">
        {% for error in form.non_field_errors %}
        <li class="message message-error">{{ error }}</li>
        {% endfor %}
    </ul>
{% endif %}

{% for field in form %}
    {% if field.is_hidden %}
        {{ field }}
        {% if field.errors %}<span class="error">{{ field.label_tag }}: {{ field.errors }}</span>{% endif %}
    {% else %}
        {% include "richtemplates/forms/field.html" %}
    {% endif %}
{% endfor %}
