The contact page allow a user to contact the support team through the [email](../../services/mailer.md) service.
The contact page allow a user to send mails to the support team (cf. [email service](../../services/mailer.md)).
When a user is not logged in, he/she will need to fill some personal information (firstname, lastname, email) in order for the support team to be able to reply. In the case he/she is logged in the information will already be completed.
User information (firstname, lastname, email) is automatically filled whenever the user is logged in. Otherwise, the task is left to the user.
The user can select a subject from a predefined list but can also enter un custom one.
The message subject can be either chosen from a dropdown list or typed in (custom subject).
The component has been developped to read a`subject` query parameter from the current url. If one exists the component sets the `subject` value of the form with the value of the query parameter. This is the way we implemented the `Contact us` feature on the info page of a dataset detail. Indeed, when one clicks the button, he/she is redirected to the contact page where the `subject` is the name of the dataset that was beeing consulted.
The component can read the`subject` query parameter from the current url. If such a query parameter is not trivial, then the component uses its value to sets accordingly the `subject` value of the form. The `Contact Us` feature available on the information tab of each dataset page relies on this fonctionnality. Indeed, when the `Contact Us` button is clicked, the user is redirected to the contact page with a prefilled `subject`, equal to the name of the visited dataset.
In order to submit the contact form, the user has to accept the general term of use and the processing of the information by checking the dedicated box at the bottom of the form.
In order to activate the submit button, the user has to accept some terms, by checking the dedicated box at the bottom of the form.