Setting formname in SQLFORM.grid(db.table1, formname='table1') did the 
trick!

Thanks again, Niphlod!

On Wednesday, April 22, 2015 at 10:04:12 AM UTC-4, LoveWeb2py wrote:
>
> Thanks, Niphlod! Should I define that like this?
>
> In SQLFORM.grid(db.table1, formname="table1)
>
> or do it in the FORM which SQLFORM.grid links to
>
> On Wednesday, April 22, 2015 at 9:57:04 AM UTC-4, Niphlod wrote:
>>
>> use different formname(s) for each grid.
>>
>> On Wednesday, April 22, 2015 at 3:15:25 PM UTC+2, LoveWeb2py wrote:
>>>
>>> Hello,
>>>
>>> I have somewhat of a weird error and I'm not sure how to fix it.
>>>
>>> Let's say I have two controllers:
>>>
>>> def controller1():
>>>      grid1 = SQLFORM.grid(db.table1)
>>>      return locals()
>>>
>>> def controller2():
>>>      grid2 = SQLFORM.grid(db.table2)
>>>      return locals()
>>>
>>> The user visits controller1 and click edit on the SQLFORM.grid, leaves 
>>> the window idle
>>>
>>> Next the user visits controller2 to get information to populate into 
>>> controller1 by viewing an individual record in controller 2 from a 
>>> different table in a separate browser
>>>
>>> Finally the user goes back to controller1 and makes his updates. When he 
>>> clicks submit he gets redirected to controller2 and none of his updates in 
>>> controller1 happen.
>>>
>>> Is this anything that can be fixed or is this normal behavior? I'm 
>>> guessing it has something to do with the CSRF protection?
>>>
>>>
>>>

-- 
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.

Reply via email to