> In 2012 I had an issue related to validation, the following solution was 
> given:
>
> including nodeID as a hidden field (if you're willing to have nodeID 
> "published" on the source page, the normal user wouldn't see this) form = 
> SQLFORM(db.tie, hidden=dict(nodeID=6)) sends a hidden field "nodeID" with 6 
> as value --> it's in request.vars --> the validator fires
>
> From your answer I learn that I either did not understand the 2012 
> solution or now web2py handels
> hidden fields differently.  
>

I think that solution was simply mistaken -- you get the hidden field in 
request.vars, but it doesn't trigger a validation. As an alternative, you 
could include the nodeID in the form as a regular field (i.e., set it to 
writable), but then use CSS to hide the input element. Or just do custom 
validation.

Anthony

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