If you use FORM, SQLFORM or SQLFORM.factory just give different names
to the forms

form.accepts(request.vars,session,formname='thisformname')

and as long as the formnames are different you have no problem.

Massimo

On Sep 7, 9:01 pm, Iceberg <[email protected]> wrote:
> Just a remind. The solution just disables the prevent-double-
> submission feature. So developers are at your own risk. If your form
> happens to be a "read-only" one, such as a search form, that is fine.
> If it is an update form, that is probably ok too. If it is a create
> form, it might cause problem.
>
> Regards,
> Iceberg
>
> On Sep8, 8:43am, Alastair Medford <[email protected]> wrote:
>
> > Aha, I didn't think the solution would be so simple. Thanks
>
> > On Sep 7, 3:35 pm, mdipierro <[email protected]> wrote:
>
> > > It is because of mechanism to prevent double form submission. It
> > > breaks with multiple forms/age. To avoid this problem replace:
>
> > > if form.accepts(request.vars, session):
>
> > > with
>
> > > if form.accepts(request.vars):
>
> > > Massimo
>
> > > On Sep 7, 4:31 pm, Alastair Medford <[email protected]> wrote:
>
> > > > Currently I am displaying multiple forms on one page via iframes, each
> > > > calling the same controller. When only one form is displayed on the
> > > > page, the form submits properly and validates etc. When two forms are
> > > > displayed however, pressing submit merely refreshes the iframe. When I
> > > > hit submit a second time, then the form acts as it should. It's like
> > > > the form has to be "warmed up" before submitting. I imagine this has
> > > > something to do with how the hidden form fields like formkey and named
> > > > are stored in the session and checked later, but I do not understand
> > > > how they work enough to resolve this. Any ideas? The code for the form
> > > > controller and the controller that builds and displays the iframes is
> > > > below.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to