[web2py] Re: IS_IN_SET validator

2011-11-21 Thread Anthony
IS_IN_SET and IS_IN_DB only produce dropdown widgets when they are not within a list of validators. The book mentions this for IS_IN_DB, but not for IS_IN_SET. Anthony On Monday, November 21, 2011 9:27:35 PM UTC-5, villas wrote: > > After giving it a little more thought, I suppose the solution

[web2py] Re: IS_IN_SET validator

2011-11-21 Thread villas
After giving it a little more thought, I suppose the solution is to use an onvalidation function. However, it is still worthy of mention that something in the book does not seem to provide an expected result.

[web2py] Re: IS_IN_SET validator zero option

2011-09-02 Thread Eric
Thanks so much, Bruno. I also found this in the manual -- I had overlooked the fact that the zero option was available there. Appreciate that you took the time to answer. Eric On Sep 1, 8:39 pm, Bruno Rocha wrote: > > db.define_table('plan', >     Field

[web2py] Re: IS_IN_SET validator not working as expected

2011-06-10 Thread selecta
On Jun 10, 2:21 pm, Ross Peoples wrote: > I'm sure you've already considered this, but maybe use a checkbox instead, yes but this is a question of style an readability, radioboxes with text are just far more descriptive an a single small checkbox > as it's specifically designed to handle true/fa

[web2py] Re: IS_IN_SET validator not working as expected

2011-06-10 Thread Ross Peoples
I'm sure you've already considered this, but maybe use a checkbox instead, as it's specifically designed to handle true/false. The SELECT widget and associated IS_IN_SET is designed to return a string value. So If you really want to use a select box for this instead of a checkbox, then you need

[web2py] Re: IS_IN_SET validator

2010-12-30 Thread mdipierro
You should use IS_IN_DB for this IS_IN_DB(db(optional_subquery),table.field,"optional representation") Because you do not want to create the set at every request even if not used. IS_IN_DB will do the query lazily. On Dec 30, 5:41 pm, Manu wrote: > Basically i have some research papers that i

Re: [web2py] Re: IS_IN_SET validator

2010-12-30 Thread Manu
Basically i have some research papers that i would like to access from my web2py application. Each paper have a title and one or many authors. But i would like also to add keywords to these papers so that i can quickly filter the ones i am interested in. What i have done so far is: db.define_table

[web2py] Re: IS_IN_SET validator

2010-12-30 Thread mdipierro
I was mistaken. I misunderstood. I am still not sure I understand. Can you make an example? On Dec 30, 2:04 pm, mdipierro wrote: > this is not currently supported. > > On Dec 30, 1:20 pm, Manu wrote: > > > Hi , > > >   I have a database which contains a list:string field type and a > > requireme

Re: [web2py] Re: IS_IN_SET validator

2010-12-30 Thread Manu
Any idea how properly doing it , should i try to create a new validator ( mixing IS_IN_SET and IS_IN_DB ) ? On Thu, Dec 30, 2010 at 8:04 PM, mdipierro wrote: > this is not currently supported. > > On Dec 30, 1:20 pm, Manu wrote: >> Hi , >> >>   I have a database which contains a list:string fi

[web2py] Re: IS_IN_SET validator

2010-12-30 Thread mdipierro
this is not currently supported. On Dec 30, 1:20 pm, Manu wrote: > Hi , > >   I have a database which contains a list:string field type and a > requirement to be in a set of value ( with IS_IN_SET AND multiple=True > ) . My question is how would you dynamically generate this set( my > categories