Hi
Using SQLFORM.factory and trying to build a dropdown box based off a
table but limiting the options in the dropdown. Here is what I have:
plantsNotForUser = db(db.plant.plantNumber==2)
form = SQLFORM.factory(
Field('plantId', db.plant, label='Plant',
requires=IS_IN_DB(db, 'plant.id', '%(plantNumber)s -
%(name)s',
zero='...choose one...',
_and=IS_NOT_IN_DB(plantsNotForUser,
'plant.id')),
default=plantId))
However, when I display the form, plant number 2 is included in the
list. I don't want to show that one.
Am I misunderstanding what the _and arg does?
-Jim