We may need to see more code. Do all the forms load on the page? If so,
what happens in the browser network tab when you submit one of them? If the
Ajax calls are being made properly, what happens on the server in the
controller (i.e., where in the code does it fail, and what does the session
look like at each stage)?
Anthony
On Tuesday, June 7, 2016 at 5:53:11 AM UTC-4, Manuele wrote:
>
> Hi guys!
>
> What's the right way to use multiple components in a page that poit to
> different forms?
>
> It seams I have a problem with the _formkey... I tyied this way:
>
> * in the component controller that is called many times I have defined:
>
> def _iface():
>
> iface = request.args(0)
>
> ...
>
> form = SQLFORM.factory(...)
>
> if form.validate(keepvalues=True, hidden=dict(name=iface),
> formname='form_'+iface):
>
> ...
>
>
> * in the main view that performs the multiple call I have written
> something like:
>
> <div id="myTabContent" class="tab-content">
> {{for n,name in enumerate(net_conf._siter()):}}
> <div role="tabpanel" class="tab-pane fade{{=' in active' if not
> n else ''}}" id="{{=name}}" aria-labelledby="home-tab">
> <p>{{=LOAD(request.controller, "_iface", extension="load",
> args=(name,), ajax=True, target="iface_"+name)}}</p>
> </div>
> {{pass}}
> </div>
>
> if I limit, in the main view, the multiple load to a single one every
> thing works fine... If more than one form are loaded only the last
> loaded works fine at the first submit.
>
> I hope I've given enough information to understand.
>
> Thank you very mutch.
>
> Cheers
>
>
> Manuele Pesenti
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.