I think you need to use the radio widget in conjunction with the IS_IN_SET 
or IS_IN_DB validator (it creates the radio button options from the 
labels/values specified in those validators).

Anthony

On Tuesday, October 11, 2011 10:45:38 AM UTC-4, Web2Py Freak wrote:
>
> am trying to use SQLFORM.factory with a widget but its not working : 
>
> def booking(): 
>     content=db(db.page.title=='booking').select(db.page.ALL) 
>     form = SQLFORM.factory( 
>         Field('your_name', requires=IS_NOT_EMPTY()), 
>         Field('your_email'), 
>         Field('like',widget=SQLFORM.widgets.radio.widget) 
>         ) 
>     if form.accepts(request.vars,session): 
>         response.flash = 'form accepted' 
>
>     elif form.errors: 
>         response.flash = 'form has errors' 
>     return dict(content=content,form=form) 
>
>
>
> the error is : 
>
> <type 'exceptions.SyntaxError'>(widget cannot determine options of 
> no_table.like) 
>
>
> what to do ??!

Reply via email to