Hi KK,
How can I protect the form from multi submissions or attacks on submitting? Normally with PHP I would generate a token that I would put in as a hidden field, upon submission if the post token did not match what was saved the form would not submit as the session wouldn't match. So upon submit, i would clear that token so if it tired to submit again the token would mismatch and the form would not submit.
So right now, someone can hit reload on my page and resend the form.
Another option would be to redirect the user back onto the contact form as if they just loaded it which would reset the form, clearing the data in the fields and such. I don't know how I would do this on a one-page site. Right now I have the name of the form set to the section the form is in on the one-page site so it goes back down to the contact form on submission.
This is a one page website.
How can I protect the form from multi submissions or attacks on submitting? Normally with PHP I would generate a token that I would put in as a hidden field, upon submission if the post token did not match what was saved the form would not submit as the session wouldn't match. So upon submit, i would clear that token so if it tired to submit again the token would mismatch and the form would not submit.
So right now, someone can hit reload on my page and resend the form.
Another option would be to redirect the user back onto the contact form as if they just loaded it which would reset the form, clearing the data in the fields and such. I don't know how I would do this on a one-page site. Right now I have the name of the form set to the section the form is in on the one-page site so it goes back down to the contact form on submission.
This is a one page website.