I've hit a roadblock and would appreciate a nudge in the right direction.

I have a grid with a field I'd like to not show to the user.  I've set the 
"onvalidation" to call a function to check values, and depending on what 
was entered in another field, add a separate value to the unseen/hidden 
field on the grid.create/edit form.

The db.table.field.default route before the grid call doesn't work because 
I don't know the value needed for the field until after the user hits 
submit and the 'onvalidation' code is run (it's a complex look, if nothing 
is found during the lookup, a record is inserted in a seperate table, and 
the id of the found/new record is placed in the hidden field).

Likewise, if I set .readable=.writable=False to hide the field, I don't see 
the field as an option in the response object inside the onvalidation 
function...  So that doesn't seem to be the way to accomplish the goal.

Finally, I thought about adding the field to the response collections, 
however, web2py is tagging the fields with keys to prevent 
double-submission and I don't know how to generate a valid key after the 
submit so as to programmatically add a new field in the mix for committing 
to the db by the grid...  

Could someone point me in the right direction / design pattern to 
accomplish the above?

Many thanks in advance.

-- 
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/groups/opt_out.

Reply via email to