Conact form: After a post the user can refresh infinite, how can i block this

After a post on the contact form and i returned back the same page for a thank you message. When the user refresh the page the email send again.

I don’t fine a solution.

Thank you

How have you implemented the form? is it custom PHP or using the Uniform plugin?

You can do one of two things: redirect to a different page or deactivate the submit button.

The “best practice” is a Post/Redirect/Get pattern.

1 Like