Using Markdown to setup Netlify Form

  • I have used Netlify forms before on another site which was built using purely HTML and successfully set it up pretty quickly. Now, I am trying to use Netlify forms using a markdown file in Gatsby but am not having any luck - no submissions are coming through.
  • Is this possible to do? Use markdown to generate a netlify form in Gatsby? The form shows up as an active form in the Netlify dashboard, but again, no submissions are coming through.
  • Here is my code:
    <form 
      name="Contact Form"
      class="contact-form"
      method="POST"
      action="/success"
      data-netlify="true"
      netlify-honeypot="bot-field"
      enctype="application/x-www-form-urlencoded"
    >
      <input name="bot-field" />
      <div>
        <label>Full Name:</label>
        <input type="text" name="name" placeholder="Full Name" />
      </div>
      <div>
        <label>Email Address:</label>
        <input type="email" name="email" placeholder="Email" />
      </div>
      <div>
        <label>Message:</label>
        <textarea name="message" placeholder="Message"></textarea>
      </div>
      <button type="submit">Send</button>
    </form>
  • Netlify instance name/Link to form: https://peaceful-easley-5fd316.netlify.com/contact

Fixed my issue by doing the following:

  1. Changing form name attribute to name="contact"
  2. Updating honeypot field to have a value that matches the form name like so
    <input type="hidden" name="form-name" value="contact" />
1 Like