{% load wagtailadmin_tags i18n %} {% comment "text/markdown" %} The field template is very flexible to cater for a wide range of use cases. It has two main attributes that support different use cases: 1. `field` to render a Django form field. This may be done through the `{% formattedfield my_field %}` template tag, or a direct `include` of this template. 2. `rendered_field` to render arbitrary HTML. This may be done through the tag pair `{% rawformattedfield %}{% endrawformattedfield %}`, or a direct `include` of this template. If both `field` and `rendered_field` are passed, `rendered_field` will be used as the actual form rendering, but metadata for the surrounding elements (such as help text and ID) will be picked up from `field`. A unified template for both use cases is messy, but it guarantees we are keeping form field styles the same everywhere. {% endcomment %}