{# contact-form override — server-driven; block-id resolution, {% form %} wiring, honeypot, and field loop copied verbatim from the builtin, reskinned with lcars-form primitives. #} {% with bid=_block_id|default:context.blockId %}
{% if form.submitted %}

{{ form.message|default:successMessage|default:"Thanks — your message has been sent." }}

{% else %} {% if heading %}

{{ heading }}

{% endif %} {% if description %}

{{ description }}

{% endif %} {% if form.errors._form %}
{{ form.errors._form }}
{% endif %} {% with formAction="/api/blocks/"|add:bid|add:"/submit" formTarget="#contact-form-"|add:bid %} {% form action=formAction hx_target=formTarget hx_swap="outerHTML" class="lcars-form-grid" %} {% for field in fields %}
{% if field.label %}{% endif %} {% if field.type == "textarea" %} {% elif field.type == "select" %} {% else %} {% endif %}
{% endfor %}
{% endform %} {% endwith %} {% endif %}
{% endwith %}