1. | Traceback (most recent call last): |
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?
Field('user_id', 'reference auth_user', default=auth.user_id)
--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/I9Xg4BI5SA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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?
Antonycould you elaborate or give an example of how to use formargs,editargs etc. ?
You write that it can be used by passing it to SQLFORM but what could be the actual use of it?In another postNiphlod get a bit closer to a use example by specifying editargs to reorder fields on an edit form. For the first it works on grid but not on smartgrid, why ?
SQLFORM.smartgrid(..., formargs={'table1': dict(...), 'table2': dict(...), ...})
Thanks, That explain why it didn't work in smartgrid (because I haven't specify the table name)I still do not understand how my arguments will effect the auto generated SQLFORM or what kind of argument will effect the form and in what way.Is Niphlod's example is the only thing you can do with it (reorder fields)?Thanks
Thanks, That explain why it didn't work in smartgrid (because I haven't specify the table name)I still do not understand how my arguments will effect the auto generated SQLFORM or what kind of argument will effect the form and in what way.
On Thursday, June 1, 2017 at 2:52:08 PM UTC-7, icodk wrote:Thanks, That explain why it didn't work in smartgrid (because I haven't specify the table name)I still do not understand how my arguments will effect the auto generated SQLFORM or what kind of argument will effect the form and in what way.Is Niphlod's example is the only thing you can do with it (reorder fields)?Thanks
Perhaps you could add a link to Niphlod's post, so that we can see what context he was addressing.