{% block cp_creation_altcha_row %}
    {% set row_attr = row_attr|merge({
        class: ('cpcreation-altcha-row ' ~ (row_attr.class|default('')))|trim
    }) %}
    <div{% with { attr: row_attr } %}{{ block('attributes') }}{% endwith %}>
        {{ form_widget(form) }}
        {{ form_errors(form) }}
    </div>
{% endblock %}

{% block cp_creation_altcha_widget %}
    <div {{ block('widget_container_attributes') }}>
        {% if altcha_widget_enabled %}
            <altcha-widget
                data-cpcreation-altcha-target="widget"
               {% if altcha_challenge_url %} data-cpcreation-altcha-challenge-url="{{ altcha_challenge_url|e('html_attr') }}"{% endif %}
               {% if altcha_profile %} data-cpcreation-altcha-profile="{{ altcha_profile|e('html_attr') }}"{% endif %}
            ></altcha-widget>
        {% endif %}

        {{ form_widget(form._payload) }}
        {{ form_widget(form._envelope) }}
        {{ form_widget(form._honeypot) }}

        {% if altcha_honeypot_enabled %}
            <span class="cpcreation-altcha-honeypot" aria-hidden="true">
                <input
                    type="text"
                    name="{{ altcha_honeypot_full_name|e('html_attr') }}"
                    value=""
                    inert
                    aria-hidden="true"
                    tabindex="-1"
                    autocomplete="off"
                    data-cpcreation-altcha-target="honeypot"
                >
            </span>
        {% endif %}
    </div>
{% endblock %}
