On Tuesday, March 15, 2016 at 9:18:00 PM UTC-4, Vinyl Darkscratch-Kazotetsu 
wrote:
>
> The *user_id* field is both non-readable and non-writable already, which 
> is what's causing that error.  It's not receiving any data for the field 
> from anywhere.  As for the various argument passing parameters, I am unsure 
> of how to implement it into the website to set form.vars.user_id to 
> auth.user.id, would you please elaborate?
>

Note, the error you are seeing is unrelated to the issue of how to hide 
particular fields from your users in the forms. If you've already set 
user_id to be non-writable, there is no need for the "fields" argument to 
SQLFORM. The problem you are having is due to the fact that the field is 
required but you have excluded it from the form without specifying a 
default. So, if the default should be auth.user_id, just do:

    Field('user_id', 'reference auth_user', default=auth.user_id)

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

Reply via email to