Not quite, try

form=SQLFORM.factory(Field('selector',requires=IS_IN_SET(select_data),default=2))


On Feb 25, 7:41 am, Rupesh Pradhan <[email protected]> wrote:
> select_data = [(1, 'first'), (2, 'second')]    
> form=SQLFORM.factory(Field('selector',requires=IS_IN_SET(select_data)))
> form.vars.selector=2
>
> Is this the correct way to set the default to 'second' by using the
> statement form.vars.selector=2?  

Reply via email to