IS_IN_DB takes also a queryset ..... Directly from http://web2py.com/books/default/chapter/29/7
query = (db.table.field == 'xyz') #in practice 'xyz' would be a variable db.table.field.requires=IS_IN_DB(db(query),....) put that before calling SQLFORM and voilà . Il giorno mercoledì 30 maggio 2012 22:47:33 UTC+2, Rod Watkins ha scritto: > > Hello everyone, > > I have a quick question. > > I am using the SQLFORM tool and creating a form using the generated custom > widgets. One part of the form allows a one to choose a user from a select > list (the table has a reference to auth_user). I'd like to limit the > options shown in the select list to only those users who are a member of a > specific group. Is there a way to apply a filter to restrict the users > added to the select widget?? > > Rod >

