Netlify Forms: Custom success message ignored due to invalid action parameter

Hi,

I’m not sure what I’m doing wrong, my custom success message isn’t being used, it seems to be ignored. Here’s my form.

<form name="contact" netlify-honeypot="bot-field" method="POST" action="/feedback/success/index.html" data-netlify="true">
  <input type="hidden" name="form-name" value="contact" />
  <p class="u-visually-hidden">
    <label>Don’t fill this out if you're human: <input name="bot-field"></label>
  </p>
  <label>What is your name?
    <input name="full-name" type="text" placeholder="Your full name" required>
  </label>
  <label>What is your email address?
    <input name="email-address" type="email" placeholder="Your email" required>
  </label>
  <label>What your message?
    <textarea name="message" type="text" placeholder="Your message..." required></textarea>
  </label>
    <button type="submit">Submit</button>
</form>

Can anyone offer a solution?

Thanks,

Dave

Hey Dave,

Take a look at our form debugging docs:

If that doesn’t help you find a solution, you’ll see the details we need (which is not your source code :)) to help you proceed with debugging, at the end of the article.

Almost all form troubles that are possible are covered in that article though, and we won’t be able to get back to you too quickly on this, so hopefully that can help you find a solution!

Thanks. I read that post before posting. That’s how I got the default message to work, but now I can’t get my custom message to work. I’ll keep trying, it’s possible I missed something. :slight_smile:

You could also send us the URL is your html form as requested and we’ll take a look, like it says there at the end :slight_smile:

Here’s the URL, https://www.davehill.dev/feedback/

Form name is contact.

I’ve made changes to the form since what I provided earlier. I’m still seeing the standard thank you for submitting though.

<form name="contact" method="POST" action="/success" enctype="application/x-www-form-urlencoded" netlify-honeypot="bot-field" data-netlify-recaptcha="true" data-netlify="true">
  
  <input type="hidden" name="form-name" value="contact">

  <p class="u-visually-hidden">
    <label>Don’t fill this out if you're human: <input name="bot-field"></label>
  </p>
  
  <label for="name">What is your name?
    <input name="name" type="text" required>
  </label>
  <label for="email">What is your email address?
    <input name="email" type="email" required>
  </label>
  <label for="message">What your message?
    <textarea name="message" required></textarea>
  </label>
  <div data-netlify-recaptcha="true"></div>
  <p>
    <button type="submit">Send</button>
  </p>
</form>

Can the active form called contact be deleted from my site? I think it’s causing a problem.

If it’s active, it cannot be deleted.

Try changing the name in the form you are using to a new name if you think the old one is interfering :slight_smile:

When I took a quick look at the html version of your form, I saw that this also is in violation of the suggestions on the debugging page:

<form name=contact method=post action=https://www.davehill.dev/success ...

  • action should be a path starting with /, not a URL.

Thanks for that @fool, I investigated why the full URL was being added and found that it was because I’d set canonifyurls to true in my Hugo config.

It’s working now. :grin: