Add Forms With Netlify

Tweet Vote on HN

If you are hosting your static site on Netlify and want to add forms to a Jekyll site but don’t want to add a lot of JS code a great way to do it is using their form feature.

Just create your form like you would normally do and add data-netlify="true":

<form class="form-inline" action="/success.html" name="mailing-list" data-netlify="true">
  <p>
    <input type="email" name="email" class="form-control-lg" placeholder="Your email..." />
  </p>
  <p>
    <button class="btn-lg btn-primary" type="submit">Join</button>
  </p>
</form>

The name value you use will be your form name at Netlify, they give you 100 captures/month for free.

After you set it up check out their Zapier integrations to get email notifications and send your form captures to somewhere like Google spreadsheets to have even more control over your data.

Tweet Vote on HN

Did you learn something useful?

Then consider signing up for my newsletter. It's a collection of fascinating finds, usually about psychology, technology, finances, philosophy, and whatever else catches my interest. I also include new articles, and book notes.