[web2py] Re: optgroup support

2016-09-19 Thread quesada . ostos
Hola, aquí la solución. Es fácil. selectnombre = SELECT(OPTGROUP(*opcions, _label="grupo"), _name="selNombre", _id="selNombre", _multiple="multiple") Saludos!! El lunes, 15 de febrero de 2010, 10:19:18 (UTC+1), hamdy.a.farag escribió: > > Hi > > I read this post > >

[web2py] Re: optgroup support

2010-04-24 Thread mdipierro
I will include OPTGROUP in trunk and some version of your patch. Massimo On Apr 24, 1:17 pm, Iceberg wrote: > Hi Massimo, > > May I have your opinion about following patch? > > If you don't like it but just because you really hate to add a > OPTGROUP helper, please tell me, I think I can adjust

[web2py] Re: optgroup support

2010-04-24 Thread Iceberg
Hi Massimo, May I have your opinion about following patch? If you don't like it but just because you really hate to add a OPTGROUP helper, please tell me, I think I can adjust my patch to work without a native OPTGROUP helper. It is up to you. Regards, Iceberg On Apr21, 3:57pm, Iceberg wrote:

[web2py] Re: optgroup support

2010-04-21 Thread Iceberg
That is better, but still not good enough because form.accepts(..., keepvalues=True) has no effect. Anyway, Massimo gave enough hint for the correct direction. Here comes my patch to html.py __all__.append('OPTGROUOP') # Finally we have native OPTGROUP support! class OPTGROUP(DIV): tag = 'opt

[web2py] Re: optgroup support

2010-04-20 Thread mdipierro
Now I see the problem: do this class MYSELECT(SELECT): def _fixup(self): pass and use MYSELECT On Apr 20, 10:41 pm, Iceberg wrote: > Massimo's answer makes sense but does not entirely solve the problem. > > Using SELECT(...) instead of TAG.SELECT(...) in my previous sample > code, does not

[web2py] Re: optgroup support

2010-04-20 Thread Iceberg
Massimo's answer makes sense but does not entirely solve the problem. Using SELECT(...) instead of TAG.SELECT(...) in my previous sample code, does not render proper html output. There are two unnecessary blank option with wrong value. I guess SELECT(...) need to be fixed to support TAG.OPTGROUP(

[web2py] Re: optgroup support

2010-04-17 Thread mdipierro
you must user SELECT and not TAG.SELECT. The former is derived from INPUT an knows how to process options, tha latter is simply derived from a DIV and does not. On Apr 17, 1:08 pm, Iceberg wrote: > Hi Denes and/or Massimo, > > I just pick up this old post > fromhttp://groups.google.com/group/web

[web2py] Re: optgroup support

2010-04-17 Thread Iceberg
Hi Denes and/or Massimo, I just pick up this old post from http://groups.google.com/group/web2py/browse_frm/thread/971433920541935a I used the code suggested by Denes, e.g. using TAG.SELECT and TAG.OPTGROUP. The code shows proper drop-down box but, after form.accepts(...) the form.vars.my_field

[web2py] Re: optgroup support

2010-02-17 Thread DenesL
So for future reference: you can create OPTGROUPs with TAG.OPTGROUP but do NOT use it with the SELECT helper, you must use TAG.SELECT as in the following example: def index(): OG=TAG.OPTGROUP g1=[ OPTION( r.name, _value=r.id ) for r in db(db.person.age<=30).select() ] g2=[ OPTION(

[web2py] Re: optgroup support

2010-02-17 Thread mdipierro
true. Use TAG.select On Feb 17, 10:06 am, DenesL wrote: > 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).

[web2py] Re: optgroup support

2010-02-17 Thread DenesL
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.a

[web2py] Re: optgroup support

2010-02-15 Thread mdipierro
Please let' snot proliferate these. Use TAG.optgroup On Feb 15, 3:19 am, "hamdy.a.farag" wrote: > Hi > > I read this post >  http://groups.google.com/group/web2py/browse_thread/thread/f9967ef715... > > and I didn't find optgroup in html.py either > > so why not adding it since from time to time