Thanks friend, I view this mail now, too late unfortunately. But I saved this for future use. Thanks again :)
On Thu, Jul 1, 2010 at 7:45 PM, Candid <[email protected]> wrote: > model: > > db = DAL('sqlite://storage.sqlite') > > db.define_table('thing', Field('category'), Field('year', 'integer')) > > db.thing.category.requires = IS_IN_SET(['a', 'b', 'c']) > db.thing.year.requires = IS_IN_SET([2000, 2001, 2002]) > > controller: > > def index(): > form = SQLFORM.factory(db.thing) > if form.accepts(request.vars, session): > things = db((db.thing.category == form.vars.category) & > (db.thing.year == form.vars.year)).select() > else: > things = [] > return dict(things=things, form=form) >

