Re: [web2py] Re: Number of records

2011-01-15 Thread Fabiano - deStilaDo
Why can' t you use the already pre-defined id field? You don't need to define a new one, every table already has and and id field with name "id". Fabiano. On Sat, Jan 15, 2011 at 6:37 AM, Rick wrote: > So the problem was that the controller file line creates an error when > I > add the 'id' f

[web2py] Temporary changing default values of a Form

2011-01-04 Thread Fabiano - deStilaDo
Hi, I have a default value for a field defined on the table definition, along with its validators. I want to create a form with a different initial value for some fields, based on the link the user clicked. Something like "add new item for this category" and the new item form come with that categ

Re: [web2py] Re: IS_IN_DB() argument

2011-01-04 Thread Fabiano - deStilaDo
mdipierro wrote: >> >> > The error is in the example. IS_IN_DB *never* accepted a table as >> > second argument. >> > Sorry for the confusion. Will fix the example. >> >> > Massimo >> >> > On Jan 3, 6:25 pm, Fabiano - deStil

[web2py] IS_IN_DB() argument

2011-01-03 Thread Fabiano - deStilaDo
Hi, from validators.py: 342 class IS_IN_DB(Validator): 343 """ 344 example:: 345 346 INPUT(_type='text', _name='name', 347 requires=IS_IN_DB(db, db.table, zero='')) 348 349 used for reference fields, rendered as a dropbox 350 """ But I can't use th