form=SQLFORM.factory(Field('child',db.children,requires=IS_IN_DB(db(db.children.sex=='M')),'children.id','%
(name)s')))On Jun 16, 11:48 pm, Pai <[email protected]> wrote: > Is it possible to do checkbox with constraints?? For example, > consider following > > db.define_table('children', Field('name'), Field('sex')) > > db.children.insert('Tom', 'M') > db.children.insert('Jerry', 'M') > db.children.insert('Eve', 'F') > db.children.insert('Mary', 'F') > > is it possible to create FORM Element which you can only select M > child? > > basically, the form should only create checkbox with Tom and Jerry > > SQLFORM(db.children) would create for all records exist.. is it > possible to put in some filtering??

