Is there any way to use the IS_IN_SET validator zero option with a db field
that is tied to a lookup table?  For example, if I have


########################################
db.define_table('plan',
    Field('id','id'),
    Field('option',type='string',label=T('Subscription Options')),
    format='%(option)s',
    migrate=settings.migrate)


########################################
db.define_table('subscription',
    Field('id','id'),
    Field('plan', db.plan),
    format='%(subscription)s',
    migrate=settings.migrate)

And then I use an SQL form on the subscription table, is there any way to
validate the plan field is set using the built-in validators?  Specifically,
I'd like to use the IS_IN_SET validator with the zero option (great idea!!),
but when I use it on the plan field above, the SQLFORM displays integer
values instead of the value labels from the lookup table.

If that's not possible, what would be the best way to make sure that this
form option is set?

Thank you!

Eric

Reply via email to