Form not going to custom thank you page (GatsbyJS)

I have a GatsbyJS site with a contact form. The form submissions work and the data is captured in the Netlify dashboard. However, upon a successful form submission, the page is redirecting to the Netlify default thank you page, and is not going to my custom thank you page. I have specified an action on the form, but it is still not working.

Site URL:

The URL for your live form as you want visitors to use it:

The form action attribute:
action=“/thanks/”

URL of custom thank you page:

The form name that you’ve set and that shows in our UI:
Fred Cuming Website Enquiries Form

Any errors or logs from the Netlify build logs, dashboard or browser developer console:
None

Hey @Adrian_Parr,
I set up a demo Gatsby site that does this. Wanna take a look at the form component and see if you can do the same thing in your form? It uses Gatsby’s built-in navigate function to do a client-side redirect to a custom page called thank-you.js.

If that doesn’t help, come back and let us know so we can try something else!

Thanks for getting back to me Jen. I’ll take a look.

1 Like

Just for the record, it started working the next day, and I hadn’t changed anything.
Maybe something was being cached by Netlify, causing it not to update straight away.

1 Like