Are you trying to set defaults values?
See http://web2py.com/book/default/chapter/07#Pre-populating-the-form

you were close, it is:
form.vars.name = 'fieldvalue'


On Sep 27, 3:27 pm, Matt Broadstone <[email protected]> wrote:
> On Tue, Sep 27, 2011 at 12:32 PM, Anthony <[email protected]> wrote:
> > You can use SQLFORM.factory and still have complete control over the form
> > layout/appearance --
> > see http://web2py.com/book/default/chapter/07#Custom-forms.
> > But if you want to access any of the SQLFORM widgets independently, they are
> > of the form SQLFORM.widgets.[field type].widget --
> > see http://web2py.com/book/default/chapter/07#Widgets.
> > Anthony
>
> Somehow I completely missed this! Many apologies. Still, using this
> approach I am still unclear as to how I might "fill" those widgets
> when I'm using the SQLFORM custom form method. Ideally, I would fill
> the form from the controller before display. I've tried:
>    - form.vars.var = "value"
>    - form.custom.var.widget.value = "value"
>
> Neither of which work. Is this possible?
> Matt
>

Reply via email to