{% block lnb_hub_spot_form %}
<form class="lnb-hubspot-form lnb-hubspot-form-{{ form.guid }}"
name="lnb-hubspot-form-{{ form.guid }}"
method="POST"
action="{{ path("lnb.frontend.hubspot.submission.async", {formId: form.guid}) }}">
{% block lnb_hub_spot_form_csrf %}
{{ sw_csrf('lnb.frontend.hubspot.submission.async') }}
{% endblock %}
{% for formFieldGroup in form.formFieldGroups %}
{% if formFieldGroup.fields|length > 0 and formFieldGroup.fields[0].fieldType !== 'hidden' %}
<fieldset>
{% endif %}
{% for field in formFieldGroup.fields %}
{% sw_include '@Storefront/storefront/hubspot/fields/' ~ field.fieldType ~ '.html.twig' ignore missing with {
'field': field
} %}
{% endfor %}
{% if formFieldGroup.fields|length > 0 and formFieldGroup.fields[0].fieldType !== 'hidden' %}
</fieldset>
{% endif %}
{% endfor %}
{% block lnb_hub_spot_form_submit %}
<div class="lnb-hubspot-form__submit">
<button class="lnb-hubspot-form__submit-button" type="submit">
{{ form.submitText }}
</button>
</div>
{% endblock %}
</form>
{% endblock %}