> > However when they get to step 6 and click multiple times because of server > lag or being impatient they get step 4 loaded again which would be an empty > form in the normal since, and if they click pay again they end up double > paying for the same order. >
I see. I think that's a design problem. web2py has built-in functionality to prevent double form submission (as long as you pass session to form.accepts, or use the default behavior of form.process, which automatically uses the session) -- it adds a one-time hidden _formkey to the form and stores it in the session, and once the form has been submitted and accepted, the _formkey is deleted from the session, so the form cannot be re-submitted. If your form processing uses a different workflow, you'll need to implement your own protection against double submission. A good start would be to disable the submit button on click, but you might also want to add some server-side protection against double submission. Anthony

