Correct. You click multiple times fast it inserts 1 record but puts you back on the same page showing the form without an error so the member thinks it was never processed and then they click it a second time creating a second record.
Where as if you click it once (no multiple fast clicks) it creates one record and redirects to another page. On Wed, May 2, 2012 at 3:28 PM, Massimo Di Pierro < [email protected]> wrote: > I cannot reproduce this: > > def test(): > db.define_table('person',Field('name')) > form = SQLFORM(db.person) > print 'processing...' > form.process(formname='test') > print db(db.person).select() > print 'done!' > if form.accepted: > print 'accepted' > import time > time.sleep(5) > print 'redirecting...' > redirect(URL('index')) > return locals() > > I can click many times but only one record is inserted. > > > On Wednesday, 2 May 2012 16:55:30 UTC-5, Bruce Wade wrote: >> >> Hi, >> >> We have a form for buying products, the form generated has the _formkey >> when clicking the submit button quick it does look like it doesn't submit >> however it still runs all the code in the accepted method and if you go to >> another page you can see that it really has completed the order. >> >> if ucashmethod.process(formname='**ucash').accepted: >> #this code is ran and the form is submitted even if >> redirect(URL('products','**index')) # This is not ran at the end if >> you double click the submit button fast. >> >> This has caused a major problem with double submittal of a >> form. Primary because the person doesn't think the form is submitted >> because it keeps them on the same page. >> -- >> -- >> Regards, >> Bruce Wade >> http://ca.linkedin.com/in/**brucelwade<http://ca.linkedin.com/in/brucelwade> >> http://www.wadecybertech.com >> http://www.fittraineronline.**com <http://www.fittraineronline.com> - >> Fitness Personal Trainers Online >> http://www.warplydesigned.com >> >> -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com

