Form is discovered but no messages come through

https://mattcanty.com/

<form
  name="contact"
  method="POST"
  data-netlify="true"
  action="/message-received"
>
  <div className="row uniform 100%">
    <div className="12u 12u$(xsmall)">
      <input
        type="email"
        name="email"
        id="email"
        placeholder="Email"
      />
    </div>
    <div className="12u">
      <textarea
        name="message"
        id="message"
        placeholder="Message"
        rows="4"
      ></textarea>
    </div>
  </div>
  <br />
  <ul className="actions">
    <li>
      <input type="submit" value="Send Message" />
    </li>
  </ul>
</form>

The form name: contact
No errors in build

Hiya, sorry you are having trouble getting your forms to work.

This Common Issue is the first port of call to debug any forms issues.

We also recommend trying to search the forums or look at topics tagged Netlify forms if you haven’t already - it’s likely your question was already asked by someone else!

If you are still having problems, please provide more information such as what you have already tried, and a link to your live form. :slight_smile:

I followed the advice on the page and at the bottom it said to start a new post using the template at the bottom of the thread. To reiterate the troubleshooting advice in my case:

  1. data-netlify=true is set
  2. The form has a name attribute
  3. There is only one form, therefore the name is unique
  4. Every input has a name
  5. Every input name is unique
  6. Form is POSTed and enctype=application/x-www-form-urlencoded
  7. I used https://www.browserling.com/ to test my site from another IP address using legitimate email address and entered a normal message into the form.

Hi @mattcanty, since you are using gatsby, can you try implementing your form as shown here? That likely will work better for you.

It works now. With just the enctype. I’d like to provide a concrete reason for this, but it is 1 of 2 things. Either:

  1. The enctype hadn’t actually deployed, my bad.
  2. My message or IP was being marked as spam

Expect it was actually that enctype was not set at the time of testing via Browserling. But either way, it works even from my IP address now.

Suggest enctype is added to the HTML example here https://docs.netlify.com/forms/setup/#html-forms

Solution

<form
  name="contact"
  method="POST"
  data-netlify="true"
  action="/message-received"
  enctype="application/x-www-form-urlencoded"
>
  <input type="hidden" name="form-name" value="contact" />
  <div className="row uniform 100%">
    <div className="12u 12u$(xsmall)">
      <input
        type="email"
        name="email"
        id="email"
        placeholder="Email"
      />
    </div>
    <div className="12u">
      <textarea
        name="message"
        id="message"
        placeholder="Message"
        rows="4"
      ></textarea>
    </div>
  </div>
  <br />
  <ul className="actions">
    <li>
      <input type="submit" value="Send Message" />
    </li>
  </ul>
</form>

Thanks
Matt

That’s peculiar since I’ve successfully deployed forms without the enctype attribute. Either way, glad you got things working.