Re: [web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-17 Thread Anthony
> > I wonder were I should have read and understood this in the first place. > I think it could be better spelled out, but the section in the DAL chapter on Record Representationmentions that reference fields get a default IS_

Re: [web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-17 Thread Cornelius Kölbel
Am 17.06.2012 02:07, schrieb Anthony: > > I will not see the f_contact as a name anymore but only as the ids. > When I remove the requires from the table definition the ids are > resolved to the names again. > > > Sorry, I forgot -- for reference fields, if you don't specify any > val

Re: [web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-16 Thread Anthony
> > I will not see the f_contact as a name anymore but only as the ids. > When I remove the requires from the table definition the ids are resolved > to the names again. > Sorry, I forgot -- for reference fields, if you don't specify any validators, it gets a default IS_IN_DB validator, and it

Re: [web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-16 Thread Cornelius Kölbel
Am 16.06.2012 22:30, schrieb Anthony: > Reference fields automatically get an IS_IN_DB validator, but you can > explicitly specify your own and pass a DAL Set as the first argument > to filter the auth_user records: > > || > db.define_table('t_customer_contact', > Field('f_customer',db.t_custo

[web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-16 Thread Anthony
Reference fields automatically get an IS_IN_DB validator, but you can explicitly specify your own and pass a DAL Set as the first argument to filter the auth_user records: db.define_table('t_customer_contact', Field('f_customer', db.t_customer, label=T("customer")), Field('f_contact', d