Problem is that you can not use TAG.optgroup because it does not work
with the SELECT helper.
Here is a little example:
def index():
OG=TAG.OPTGROUP
g1=[ OPTION( r.name, _value=r.id ) for r in
db(db.person.age<=30).select() ]
g2=[ OPTION( r.name, _value=r.id ) for r in
db(db.person.age>30).select() ]
ogs=[OG(_label='30 and under',*g1),OG(_label='over 30',*g2)]
sel=SELECT(_name='person',*ogs )
f=FORM( sel )
print ogs[0] # OK
print ogs[1] # OK
print sel # not OK
return dict(f=f)
The SELECT is completely messed up inside since it only checks for
OPTION instances.
Denes.
On 15 feb, 09:48, mdipierro <[email protected]> wrote:
> Please let' snot proliferate these.
>
> Use TAG.optgroup
>
> On Feb 15, 3:19 am, "hamdy.a.farag" <[email protected]> wrote:
>
> > Hi
>
> > I read this post
> > http://groups.google.com/group/web2py/browse_thread/thread/f9967ef715...
>
> > and I didn't findoptgroupin html.py either
>
> > so why not adding it since from time to time people may need it?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.