[web2py] Error thrown using sample code from SQLFORM chapter of web2py book

2012-01-31 Thread pbreit
I think the assignment should be in the if form.process().accepted: clause.

[web2py] Error thrown using sample code from SQLFORM chapter of web2py book

2012-01-31 Thread monotasker
I'm trying to add a hidden form to a SQLFORM using the sample code on p. 331 of the 4th edition book (pdf): form.vars.a = request.vars.a form = SQLFORM(..., hidden=dict(a='b')) When I submit the form, though, I get an error because I'm calling the variable 'form' before assignment. If I reverse