The javascript stuff is just "optional". On Jan 28, 8:11 am, aveev <nashrullah_a...@yahoo.com> 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 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 <dereurom...@googlemail.com> wrote: > >> 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 <dereurom...@googlemail.com> wrote: > > >> > maybe some js disabling after clicking the submit button like > >> inhttp://www.norio.be/blog/2008/09/using-jquery-prevent-multiple-form-s... > > >> > 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 not know > >> > that and the form data could get lost because they wont be able to > >> > submit anymore > > >> > or use a timeout - like 2 seconds - most of the multiple submission > >> > happens due to a double click on the button (by accident or not) > > >> > after all, it does make sense to check on already submitted data in > >> > PHP again > >> > this will work even it js is disabled - read the last inserted record > >> > and compare it to the current one > >> > if they match, its obviously a double post > > >> > On 28 Jan., 01:55, aveev <nashrullah_a...@yahoo.com> wrote: > > >> > > How can I avoid multiple form submission ?? > >> > > I know that this topic has been discussed in other forums. > >> > > When a user submits a form, how can we prevent the user to submit the > >> form > >> > > again and again ? > >> > > I read some threads in other forums. They use a session variable > >> (writing a > >> > > value to a session variable when the user submits the form and check > >> whether > >> > > this value exists upon next form submission) > >> > > Does cake have a built-in way to avoid multiple form submission ? > >> > > What's the best way to avoid multiple form submission ?? > >> > > Thanks > > >> > > I use cakephp 1.2 > > >> > > -- > >> > > View this message in > >> context:http://old.nabble.com/Avoid-multiple-form-submission-tp27349363p27349... > >> > > Sent from the CakePHP mailing list archive at Nabble.com. > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en > > -- > View this message in > context:http://old.nabble.com/Avoid-multiple-form-submission-tp27349363p27351... > Sent from the CakePHP mailing list archive at Nabble.com.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en