Custom success page for a from


Is it possible to change te default success page you get when you submit a form

I found different answers regading this problem, some said just use the action data-attribute but it just ignores it. Other said you need to redirect with use of functions

If you need to redirect the page can someone pleas explain it to me in detail how to do it because I have no clue on how to do it.

It would be nice to see if the action arrtibute works because it is the intended way of handeling a submission

But anyways thanks in advance

Hey @ikke123HH,

Our docs cover the most simple way of changing the form’s action upon submission. We also have a great guide which looks at examples from a couple of popular static site generators which you may want to check out!

it is weird because i tried it but didn’t work

my code is <form action="/dist/pages/form_afhandeling.php" method=“post” … and it just ignores it and on the live page it looks like this <form method=“post” ….

hi there, are you trying to handle your form with a php file? Netlify does not support php the way i think you are hoping to.

Here is a good summary of what you can and can not do on Netlify you might find helpful:

I was trying to get name, email, message, … with php and build a page with php so I would have the persons name and stuff like that.

But that you can’t or am i wrong

In what language can I try to replicate this or is there none?
If not: do I need to make a normal html page and it would be all good but I lose the name and stuff like it?


I also tried redirecting to a javascript page within my own website, but this issue hasn’t been fixed for me either :confused:

hmm thast not good, But I think I will make a stactic html page and placing a shot words or so since it will not work

Yeah, PHP ain’t gonna work around here, unfortunately :frowning: Check out this resource for more!

@tagalon, happy to take a look at an issue with your JavaScript form(s) if you create a topic. However, before that, you may find this topic useful.

Ok tanks for letting me know, I will try to make a static landing page It is not as nice as in php but it will do the job :frowning_face:

Is there any possibility php is ever comming to netlify? Because I think it would be a great asset on this platform @Pieparker

hi @ikke123HH, it is very very unlikely we would consider implementing support for PHP in the future. I’m sorry, wish i had better news for you!

Ah to bad but it is above my decision :persevere: