Hello Marty, On Saturday, February 8, 2014 6:55:26 AM UTC+1, A36_Marty wrote: > > I've given up on trying hide a field in the grid yet still be able to see > and modify it in the onvalidation route. > > I tried for a few hours to achieve the same via custom forms by using > hidden={'fieldname':value}. I could see the hidden field in the validation > function of the custom form, but couldn't get the value in the storage > fields to make it back to the database. (..cut..) >
You're probably not missing much here. The SQLFORM does not process hidden fields automatically, that's a security measure. You need to manually transfer such values from request.vars back into form.vars, for example: form=SQLFORM(....) form.vars.field_hidden=request.vars.field_hidden if form.accepts(....) Keep in mind that hidden form fields can be altered by the user. You have no guarantee what the value of the hidden field is after you've received it back. > I'm just a hobbyist, trying to learn, but am fast thinking I should just > stick to spreadsheets / this is proving to be over my head. > Nah, keep at it! :) Sure, some issues will take time to troubleshoot, but it gets easier after every one. Web2py is very intuitive and the Web2py Book, this group, slices, etc. are great resources. Regards -- 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.