[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-26 Thread David Gawlowski
Okay, for posterity's sake, here is how I got it working: in model: db.define_table('games', Field('parts', widget = SQLFORM.widgets.radio.widget, requires = IS_IN_SET({'Halves','Quarters'})), etc in controller: form = SQLFORM(db.games) (in other words nothing special) in view: {{=f

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-13 Thread David Gawlowski
Thanks again Alan, but the name in the original was just an example and in the second post I reverted to actual variables, which is why you see "parts"... and alas that did not fix it. that said I *think* I have it working, just need to battle through the CSS nightmare that is bootstrap and fig

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-13 Thread Alan Etkin
> > Thanks Alan - I'm still trying to get the intended result: Bootstrap > buttons that function like radio buttons. I studied fields being brought > in as normal radios > Have you tried setting name="opt" for this input instead (leaving the options with their original attributes)? -- Re

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-13 Thread David Gawlowski
Thanks Alan - I'm still trying to get the intended result: Bootstrap buttons that function like radio buttons. I studied fields being brought in as normal radios, and like you suggested added the names: which DOES work until you change the type to button: at which point the value is NO

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-12 Thread Alan Etkin
> > hoping someone can point me in the right direction, as the post title says > I want to use a btn-group > Try using name="opt" for the input element. However, it would be better to use a custom widget. http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#Widgets -- Resou