Problem with form redirection in NextJS

Website: Desarrolla tu landing page por tan solo 35€ al mes | Manuwweb

As you can see in the attached image, I am trying to code the redirection. Everything works, when I send the form it redirects me to the page that I indicate and the form arrives in the mail, but the default netlify message appears and my custom page does not appear.

Thank you!

Welcome to the forums @manuwweb! Thanks for reaching out.

Just to clarify that we understand the issue:

We submitted a test form to your website, and saw a custom message that the form was submitted from this page:

The form did not redirect us to a new page.

Can you confirm this is the correct form? What is the expected behavior? Can you provide a reproduction of the error you’re seeing so we can look into this further?

Additionally, have you searched our forums for related topics? If not, here’s a link to get you started: [Support Guide] Debugging support and help for Netlify Forms -- start here!

Oh Sorry, I did not indicate where the form was, it is the one below (attached images)

When the popup opens scroll down to see the form

@manuwweb thanks for confirming! We’ve taken another look at this, and we think that this might be happening because you’re attempting to hard code a redirect instead of just using the action field as described in our Forms docs here.

Can you try commenting out the portion of your code where you set the redirect and let us know the result?

I confirm that the problem is putting a variable in the action field. I will have to look for another solution to make the redirect change.

Thank you! :slight_smile: