On Wednesday, March 16, 2016 at 1:32:26 AM UTC-4, Vinyl 
Darkscratch-Kazotetsu wrote:
>
> 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.
>

No, default can be set after the model declaration, including in the 
controller (but before the grid is created, as the grid method handles the 
form processing and database insert, so any model attributes must be set 
before calling the grid).
 

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

Not exactly clear what you want to do, but maybe an onvalidation function 
would work (it takes the form object, so you can access and manipulate 
form.vars).

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