Best practice forum (Archived)

Prevent multi submision

 
YunZhen
Prevent multi submision
YunZhen 发表于 2012年03月15日 Thursday 21:57
 

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

CogginsSimon
Re: Prevent multi submision
CogginsSimon 发表于 2012年03月20日 Tuesday 14:50
小组 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