{% with field.tag_name|default:'div' as tag_name %}
<{{tag_name}} id="field_{{field.field_id}}"
              data-field-id="{{field.field_id}}"
              class="field {{field.get_css_classes|join:' '}}"
              {% for key, value in field.get_dom_attributes.items %} {{key}}="{{value}}"{% endfor %}
              {% for key, value in field.get_data_attributes.items %} data-{{key}}="{{value}}"{% endfor %}
              >{{field.value_as_html|safe}}</{{tag_name}}>
{% endwith %}
