{% load helpers %} {% load form_helpers %} {# If the form field carries an `htmx_attrs` dict, wrap output in a persistent HTMX swap target. #} {# The wrapper's innerHTML is replaced on each swap; the wrapper itself persists across swaps so #} {# its HTMX attributes do not need to be re-emitted by the partial that returns the new content. #} {% if field.field.htmx_attrs %}
{% endif %} {% if field|widget_type == 'checkboxinput' %}
{{ field }}
{% if bulk_nullable %}
{% endif %} {% if field.help_text %} {{ field.help_text|safe }} {% endif %} {% elif field|widget_type == 'textarea' and not field.label %}
{{ field }} {% if bulk_nullable %}
{% endif %} {% if field.help_text %} {{ field.help_text|safe }} {% endif %} {% else %}
{% if field.field.htmx_attrs %}
{% endif %}