RTM, eh. I didn't think to look at the IS_IN_DB validator for this. In 
fact, I didn't even have one as I was relying on the default. Thanks!!

On Wednesday, 30 May 2012 13:55:35 UTC-7, Niphlod wrote:
>
> 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
>>
>

Reply via email to