[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread mdipierro
I would go for form = SQLFORM.factory(Field('name',requires=IS_IN_SET(['A', 'B', 'C']))) On Nov 29, 2:50 pm, CesarBustios wrote: > Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: > > form = FORM('Campaña ', >               INPUT(_type='text', _name='name', > requires=IS_IN_

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread CesarBustios
I want to make a dropdown list. regs=db(db.Campana.id > 0).select(orderby='nombre') form = FORM('Campaña: ', SELECT([c.nombre for c in regs], _name='camp'), INPUT(_type='submit', _value='Mostrar')) This worked fine :) On 29 nov, 16:16, DenesL wrote: > The IS_IN_SET l

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread DenesL
The IS_IN_SET looks good, but 'Campana' is not an HTML element. On Nov 29, 3:50 pm, CesarBustios wrote: > Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: > > form = FORM('Campaña ', >               INPUT(_type='text', _name='name', > requires=IS_IN_SET(['A', 'B', 'C'])), >