Hi.
You don't need the [] brackets.
use:
db.define_table('user',
db.Field('sex', requires = IS_IN_SET(['male', 'female'])))
regards
mmlado
On Tuesday 02 June 2009 13:39:35 durga wrote:
> hi
>
> I would like create a form through SQLFORM in which one of my field to
> be generated as combo box. for example i have options male/female for
> a sex field. How do i write code for this.
>
> db.define_table('users',
> SQLField('sex',requires=[IS_IN_SET
> (['male','female'])])
>
> thanks in advance
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---