Or you will have to create a custom widget... You can grab the radio.widget in /gluon/sqlhtml.py ans search for RadioWidget class...
You can turn it into a method with the help of the book. But the kargs above should work as far as I can see look at the code of the RadioWidget... Richard On Mon, Jan 6, 2014 at 2:24 PM, Richard Vézina <ml.richard.vez...@gmail.com>wrote: > You can try this : > > **{'_class': 'radio'} > > As a kargs... > > Richard > > > On Mon, Jan 6, 2014 at 1:53 PM, Annet <anneve...@googlemail.com> wrote: > >> I have the following field definition in a table: >> >> Field('title', length=8, requires=IS_IN_SET(['Mr', 'Mrs'. 'Ms']), >> widget=lambda k,v: SQLFORM.widgets.radio.widget(k, v, style='divs')), >> >> I would like to style the radio widget, but adding _class='radio' to the >> widget function does not add a class attribute to the divs. >> Is there a way to add this class? >> >> Kind regards. >> >> Annet >> >> -- >> 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/groups/opt_out. >> > > -- 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/groups/opt_out.