Re: [web2py] Re: what validator do I use to produce radio boxes in html?

2012-09-15 Thread Pystar
Thanks, it works now, since I made the IS_IN_SET() the first in my validators like. But with the way I struggled with it, I think that quirky feature should be noted in the documentation to help newbies. On Saturday, September 15, 2012 9:19:47 PM UTC+1, Anthony wrote: > > On Saturday, September

Re: [web2py] Re: what validator do I use to produce radio boxes in html?

2012-09-15 Thread Anthony
On Saturday, September 15, 2012 2:49:56 PM UTC-4, Pystar wrote: > > exactly what I did but it still threw that error. Can you show the exact code? If you have a list of validators, I believe IS_IN_SET must be the first in the list. > Also, kindly note that I am adding this extra field to the

Re: [web2py] Re: what validator do I use to produce radio boxes in html?

2012-09-15 Thread Pystar
exactly what I did but it still threw that error. Also, kindly note that I am adding this extra field to the auth_user table. And displaying it in a custom form. Also another question concerning custom forms, in the view, how do I access elements of the form using syntax like form[0]["_class"] =

Re: [web2py] Re: what validator do I use to produce radio boxes in html?

2012-09-15 Thread Alec Taylor
Something like this: Field('sex', requires=IS_IN_SET(['male','female'], widget=SQLFORM.widgets.radio.widget) On Sun, Sep 16, 2012 at 4:32 AM, Pystar wrote: > Doing that threw this error: > widget cannot determine options of > auth_user.sex > > > On Saturday, September 15, 2012 7:21:42 PM UTC+1,

[web2py] Re: what validator do I use to produce radio boxes in html?

2012-09-15 Thread Pystar
Doing that threw this error: widget cannot determine options of auth_user.sex On Saturday, September 15, 2012 7:21:42 PM UTC+1, Anthony wrote: > > I don't think there's a validator that does it automatically, but you can > specify widget=SQLFORM.widgets.radio.widget. See > http://web2py.com/b

[web2py] Re: what validator do I use to produce radio boxes in html?

2012-09-15 Thread Anthony
I don't think there's a validator that does it automatically, but you can specify widget=SQLFORM.widgets.radio.widget. See http://web2py.com/books/default/chapter/29/07#Widgets. Anthony On Saturday, September 15, 2012 2:12:17 PM UTC-4, Pystar wrote: > > what validator do I use to produce radio