I see it now — I had assumed that you could set the default in the controller 
function, but it seems that it has to be in the model file.  Thank you for your 
help on this issue.

Still, though…I would like to know how to edit the variables submitted by the 
form, and still unsure how to do that.  For example, if a staff member were to 
post their Inkbunny link, I would want to force that link’s explicit field to 
true, but by default they provide the choice of marking it as explicit content 
or not.  Any good suggestions there?

> On Mar 15, 2016, at 21:24, Anthony <abasta...@gmail.com> wrote:
> 
> 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 
> <http://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/>
> - http://web2py.com/book <http://web2py.com/book> (Documentation)
> - http://github.com/web2py/web2py <http://github.com/web2py/web2py> (Source 
> code)
> - https://code.google.com/p/web2py/issues/list 
> <https://code.google.com/p/web2py/issues/list> (Report Issues)
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/I9Xg4BI5SA8/unsubscribe 
> <https://groups.google.com/d/topic/web2py/I9Xg4BI5SA8/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> web2py+unsubscr...@googlegroups.com 
> <mailto:web2py+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

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