How can I make all fields mandatory in my website's contact page?

Hello everyone,

I would like to “force” the customer of my website to fill all the cases of my contact page : Name, phone, email, message, except for the enterprise case.

I share with you the code of my page.contact-liquid :

{{ page.content }}

{% form ‘contact’ %}

{% if form.errors %}
{{ form.errors | default_errors }}
{% endif %}

{% if form.posted_successfully? %}

{{ 'general.contact_page.success_message' | t }}

{% else %}
{{ 'general.general.name' | t }}
Télephone
{{ 'general.general.email' | t }}
Entreprise
{{ 'general.general.message' | t }} {{ form.comments }}

{% endif %}

{% endform %}

Thanks in advance for your help :slightly_smiling_face:

Always make backups of themes before making changes.

On each , create the required attribute and aria-required=“true” attribute.

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required