Hi, I'm using a referenced table with IS_IN_DB validator, but I'd like to 
filter the fields to be shown in the combo list.
As an example:

db.define_table('person',
    Field('name'),                      
    Field('surname),
    Field(age,'integer')
)

db.define_table('class_attendant',
    Field('Date','date'),
    Field('Classname'),             
    Field('person_id',db.person,readable=True,writable = True, 
label="User"))

db.class_attendant.person_id.requires = IS_IN_DB(db,'person.id','%(name)s 
%(surname)s')

When using a SQLFORM(db.class_attendant) to add new persons to  the 
class_attendant table, the combo list shows all the persons in the person 
table, but I'd like it to show only the persons whose age is upper than 18.
What's the best method to do it?

Reply via email to