{% if isSubmitted %} {% include 'components/insurance/_confirmation.html.twig' %} {% else %}
{{ form_start(form, { attr: { 'data-controller': 'dynamic-form', 'data-action': 'live#action:prevent', 'data-live-action-param': 'submit', 'class': 'space-y-6', 'id': 'assurance-animaux-form' } }) }} {# Affichage des erreurs globales #} {% if form.vars.errors|length > 0 %} {% include 'components/insurance/_errors_global_html.twig' %} {% endif %}

Informations sur votre animal

{# Type d'animal #} {% include 'quote_request/_form_field.html.twig' with { field: form.espece, attr: { 'data-action': 'change->live#action', 'data-live-action-param': 'refreshForm' } } %} {# Race - Champ conditionnel #} {% if form.race is defined %} {% include 'quote_request/_form_field.html.twig' with { field: form.race } %} {% endif %}
{# Âge #} {% include 'quote_request/_form_field.html.twig' with { field: form.age, placeholder: 'Ex: 3' } %} {# Poids #} {% include 'quote_request/_form_field.html.twig' with { field: form.poids, placeholder: 'Ex: 8.5' } %}
{# Sexe #}
{% set hasError = form.sexe.vars.errors|length > 0 %} {{ form_widget(form.sexe, { 'attr': { 'class': 'space-x-4' } }) }} {% if hasError %}
{{ form_errors(form.sexe) }}
{% endif %}
{# Stérilisé #}
{% set hasError = form.sterilise.vars.errors|length > 0 %} {{ form_widget(form.sterilise, { 'attr': { 'class': 'space-x-4' } }) }} {% if hasError %}
{{ form_errors(form.sterilise) }}
{% endif %}
{# Mode de vie #} {% include 'quote_request/_form_field.html.twig' with { field: form.modeVie } %}

Santé de l'animal

{# Vaccination #}
{% set hasError = form.vaccineRegulierement.vars.errors|length > 0 %} {{ form_widget(form.vaccineRegulierement, { 'attr': { 'class': 'space-x-4' } }) }} {% if hasError %}
{{ form_errors(form.vaccineRegulierement) }}
{% endif %}
{# Antécédents médicaux #}
{% set hasError = form.antecedentsMedicaux.vars.errors|length > 0 %} {{ form_widget(form.antecedentsMedicaux, { 'attr': { 'class': 'space-x-4', 'data-action': 'change->live#action', 'data-live-action-param': 'refreshForm' } }) }} {% if hasError %}
{{ form_errors(form.antecedentsMedicaux) }}
{% endif %}
{# Description des antécédents - Champ conditionnel #} {% if form.descriptionAntecedents is defined %}
{% include 'quote_request/_form_field.html.twig' with { field: form.descriptionAntecedents, placeholder: 'Décrivez les problèmes de santé connus de votre animal', fullWidth: true } %}
{% endif %}

Informations sur le contrat

{# Formule d'assurance #}
{% set hasError = form.formule.vars.errors|length > 0 %}
{% for choice in form.formule %}
{{ form_widget(choice, { 'attr': { 'class': 'sr-only peer', } }) }}
{% endfor %}
{% if hasError %}
{{ form_errors(form.formule) }}
{% endif %}
{# Date d'effet #} {% include 'quote_request/_form_field.html.twig' with { field: form.dateEffet } %} {# Périodicité #} {% include 'quote_request/_form_field.html.twig' with { field: form.periodicite } %}
{# Franchise #} {% include 'quote_request/_form_field.html.twig' with { field: form.franchise } %}
{# Form footer #} {% include 'components/insurance/_form_footer.html.twig' %}
{{ form_rest(form) }}
{{ form_end(form) }} {# Information complémentaire #} {% include 'components/insurance/_more_information.html.twig' %}
{% endif %}