Re: Avoid multiple form submission

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
The javascript stuff is just "optional". On Jan 28, 8:11 am, aveev wrote: > Ok, thanks for the replies, I'll try them.. > > > > Miles J wrote: > > > You can enable the Security component, which does the session and bot > > validation automatically. > > > Secondly, after a post is done, you can un

Re: Avoid multiple form submission

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
Multiple form submissions are just the peak of the iceberg. http://www.ad7six.com/entries/view/67/Generic-capability-based-security-%28CSRF-prevention%29 http://teknoid.wordpress.com/2008/11/05/make-your-cakephp-forms-a-lot-more-secure/ Basically speaking. Any CUD (like CRUD without the R) operat

Re: Avoid multiple form submission

2010-01-27 Thread aveev
Ok, thanks for the replies, I'll try them.. Miles J wrote: > > You can enable the Security component, which does the session and bot > validation automatically. > > Secondly, after a post is done, you can unset the data so that the > form is empty. unset($this->data['Model']); > > Thirdly, yo

Re: Avoid multiple form submission

2010-01-27 Thread Miles J
You can enable the Security component, which does the session and bot validation automatically. Secondly, after a post is done, you can unset the data so that the form is empty. unset($this->data['Model']); Thirdly, you can have the page just redirect somewhere else. On Jan 27, 5:24 pm, euromark

Re: Avoid multiple form submission

2010-01-27 Thread euromark
by the way i just tried this snippet $("form input.submit").bind("dblclick", function(e){ e.preventDefault(); return false; }); and it works quite well for prevention of any double (or multiple) clicks :) On 28 Jan., 02:10, euromark wrote: > maybe some js disabling after clicking the s

Re: Avoid multiple form submission

2010-01-27 Thread euromark
maybe some js disabling after clicking the submit button like in http://www.norio.be/blog/2008/09/using-jquery-prevent-multiple-form-submissions but i guess this can get problematic if the connection gets aborted or user cancels manually he would then have to reload or hit F5 - some users might no