In the section about SQLFORM, the description of hidden fields is 
demonstrably wrong.  The code example is:

form.vars.a = request.vars.a
form = SQLFORM(..., hidden=dict(a='b'))


Since the variable "form" is created on the second line, it is not 
available on the first as the target of an assignment.

I do not know what the documentation should say, but I suspect its a bit 
more complex than this simple two-line example.  I've been struggling with 
this most of the day and saving the values from hidden fields still eludes 
me.  I can't assign the fields in an "onvalidation" method because the 
accepts() logic specifically looks for fields which are in the request.vars 
and excludes them from the saved fields.  I've been tracing thru "validate" 
and "accept" in FORM and SQLFORM most of the day looking for a crack in the 
armor to get my hidden fields saved.

Joe

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to