Web Island Agency

How to set up forms handling on Netlify

How to set up forms handling on Netlify

Form handling is a built-in feature on Netlify. Basic setup doesn't require any additional JS or API calls. Just add a data-netlify="true" attribute or netlify to the tag of your form. Netlify build bots are parsing your website, while it deploys, to find forms marked with the attributes.

All form submissions are getting to the Netlify Forms interface of your website. In your website dashboard, go to the Forms → Active forms. The tab contains a list for all the forms you have on the website. Each form is visible in the list named by the value of the form name attribute.

Full form example:

<form name="hello" method="POST" data-netlify="true">
  <p>
    <label for="name">Say your name:</label>
    <input type="text" name="name" />
  </p>
  <p>
    <label for="email">What's your Email:</label>
    <input type="email" name="email" />
  </p>
  <p>
    <label for="level">Your level:</label>
    <select name="level[]" multiple>
      <option value="junior">Junior</option>
      <option value="middle">Middle</option>
      <option value="senior">Senior</option>
    </select>
  </p>
  <p>
    <label for="message">Your message:</label>
    <textarea name="message"></textarea>
  </p>
  <p>
    <button type="submit">Submit</button>
  </p>
</form>

The article is published under the tags

Read more articles related to the topic