{% load wagtailcore_tags my %}
{{ form.text|richtext }}
{% csrf_token %}
{% for field in form|cached_form:request %} {% with widget_class=field.field.widget|klass %}
{% with form_icon=icons|ico_get:widget_class|ico:theme %} {% if form_icon %} Icon {{ widget_class }} {% endif %} {% endwith %} {{ field.label_tag }} {% if field.field.widget.attrs.required %}*{% endif %}
{{ field }}
{{ field.errors }} {% if field.help_text %} {{ field.help_text|safe }} {% endif %}
{% endwith %} {% endfor %}