Best practice forum (Archived)

Prevent multi submision

 
Zhen Yun
Prevent multi submision
by Zhen Yun - Thursday, 15 March 2012, 9:57 PM
 

Hi,

I have a normal php form to send alerts.

But after sent the alert, user can click brower's back button and submit again to send the alert.

In totara, any function can use to prevent multi submission issue?

 

 

Thanks and Regards

Simon Coggins
Re: Prevent multi submision
by Simon Coggins - Tuesday, 20 March 2012, 2:50 PM
Group Totara

Not really.

Normally you would use the POST method for a form that submits data to be stored, and most browsers will give you a warning if you try to resubmit a form via a refresh. I suppose you could add some code which looked for an existing record and failed the form validation if it already exists but that would require custom code, there is no specific way to do it.

Simon