Building forms is a common task in front-end development. In this exercise, we will build a basic "Contact Us" form, commonly seen on marketing websites for visitors to ask questions or provide feedback.
<textarea> will be more suitable.The supplied helper reads the form fields and sends a JSON POST request to https://questions.greatfrontend.com/api/questions/contact-form with the following fields in the request body: name, email, message.
If all the form fields are correctly filled in, you will see an alert containing a success message. Congratulations!
You only need to write HTML for this question. Focus on form controls, labels, field names, and submission attributes.
Build the form in HTML and keep the supplied helper. The description explains that the helper reads the fields, sends the JSON request, and displays the response.
The supplied form helper posts to the question API at questions.greatfrontend.com. The description and official solutions were updated to use that host.
The Vue starter imports the submission helper under the name used by the form so it can submit successfully.