[web2py] Re: integer range select box

2010-05-16 Thread Richard
I already have the default set. The problem comes when I use SQLFORM to edit the record with this field set to 0 (not create). On May 16, 12:29 pm, mdipierro wrote: > you have to add db.table.field.default=0 > > On May 15, 9:26 pm, Richard wrote: > > > > > thanks for that. > > > I found if the

[web2py] Re: integer range select box

2010-05-15 Thread mdipierro
you have to add db.table.field.default=0 On May 15, 9:26 pm, Richard wrote: > thanks for that. > > I found if the range includes negative numbers such as > IS_IN_SET(range(-5, 6), zero=None), and the field value is 0, then > SQLFORM will select the first entry (-5) rather than 0. > > On May 16, 2

[web2py] Re: integer range select box

2010-05-15 Thread Richard
thanks for that. I found if the range includes negative numbers such as IS_IN_SET(range(-5, 6), zero=None), and the field value is 0, then SQLFORM will select the first entry (-5) rather than 0. On May 16, 2:46 am, Iceberg wrote: > On May15, 11:14pm, Jose wrote: > > > On 15 mayo, 10:58, Richa

[web2py] Re: integer range select box

2010-05-15 Thread Jose
> > Why bother the [x for x in ...] ?  Just do >     requires = IS_IN_SET(range(1, 4)) You are right Jose

[web2py] Re: integer range select box

2010-05-15 Thread Iceberg
On May15, 11:14pm, Jose wrote: > On 15 mayo, 10:58, Richard wrote: > > > I want the user to select an integer between a certain range (their > > birth year) . IS_INT_IN_RANGE provides the restriction but uses an > > input box - how can I get SQLFORM to use a select box for this integer > > range?

[web2py] Re: integer range select box

2010-05-15 Thread Jose
On 15 mayo, 10:58, Richard wrote: > I want the user to select an integer between a certain range (their > birth year) . IS_INT_IN_RANGE provides the restriction but uses an > input box - how can I get SQLFORM to use a select box for this integer > range? > > Richard This helps you? .requires =