Thanks so much, Bruno.  I also found this in the manual -- I had
overlooked the fact that the zero option was available there.

Appreciate that you took the time to answer.

Eric

On Sep 1, 8:39 pm, Bruno Rocha <[email protected]> wrote:
> ########################################
> 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, *required=True*),
>     format='%(subscription)s',
>     migrate=settings.migrate)
>
> *db.subscription.plan.requires = IS_IN_DB(db, 'plan.id' ,'%(option)s',
> zero=None)*
>
> --
> Bruno Rocha
> [ About me:http://zerp.ly/rochacbruno]
> [ Aprenda a programar:http://CursoDePython.com.br]

Reply via email to