Try this:
db.define_table('test',
                Field('answer',default='Maybe'))
db.test.answer.requires = IS_IN_SET(['Yes','No','Maybe'])
def horizontal_radios(f,v):
    table = SQLFORM.widgets.radio.widget(f,v)
    rows = table.elements('tr')
    table.components = []
    table.append([row.elements('td') for row in rows])
    return table
db.test.answer.widget = horizontal_radios

On Jun 16, 8:22 am, Johann Spies <[email protected]> wrote:
> How do I get radio buttons (and check boxes) to show up horizontally
> in stead of  vertically?
>
> e.g.
>
> Yes  {}    No  {}
>
> in stead of
>
> Yes {}
> No  {}
>
> Regards
> Johann
> --
> "Finally, brethren, whatsoever things are true,  whatsoever things are
> honest, whatsoever things are  just, whatsoever things are pure,
> whatsoever things are lovely, whatsoever things are of good report; if
> there be any virtue, and if there be any praise, think on these
> things."    Philippians 4:8

Reply via email to