M
M
magary42017-05-08 10:08:32
JavaScript
magary4, 2017-05-08 10:08:32

Prevent form resubmission in symfony?

after submitting the form, the same page is loaded
if you press f5 - the browser will ask for confirmation of resubmitting the form and if you press "ok" then the form will be resubmitted
all that googled - do a 302 redirect to the same page
is there any other option?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel, 2017-05-08
@Volde

In the form handler on the server, do a redirect

T
ThunderCat, 2017-05-08
@ThunderCat

location ref is a normal method, a standard solution to this problem.
as an option - use Ajax, if after submitting it does not go to another logical page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question