Netlify's Form redirects to wrong path. Rendered html shows correct path

Good morning,

I’ve got a question about Netlify’s Forms. It seems to (re)direct the visitor to the wrong path after successful submit. Even though the rendered html provides the right path.

The outline:
It’s a Gatsby.js project with a CMS.
The content is multilingual so I’ve got a contact page on /contact/ and /en/contact/ These obviously share the same code for a form. I’ve created a successful form submit page on /form-succes/ and /en/form-succes/

But when I’m on the Dutch side and I submit the form I see the url go to /form-succes/ for a split second, and then it goes (redirects?) to /en/form-succes/ I think it does this because I see the path/url for a split second.

It runs well on a local env but not after build on Netlify.

Is this a Netlify issue or did I do something wrong?

This is part of the form:

var pathPrefix is, depending on the language / or /en/

// input stuff

I hope you can provide me with some more insight on this.

1 Like

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

This Support Guide is the first port of call to debug any forms issues. There are also many other Support Guides for forms - you can find them here: #Netlify-support:support-guides

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, let us know.