Ah, I see what my problem is — the default was defined after the SQLFORM.grid() in the controller, not before it. Works like a charm, no errors or issues.
As for onvalidation, I’ll give it a whirl and see how it goes. Thank you. > On Mar 15, 2016, at 22:42, Anthony <abasta...@gmail.com> wrote: > > 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/> > - 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.