Hmmm.

I'm on 1.98.2.

This needs more investigation, but I can't do it today.

On Aug 30, 8:39 am, DenesL <[email protected]> wrote:
> SQLFORM with hidden fields works fine in 1.98.2:
>
> # model
> db.define_table('dog',
>   Field('name'),
>   Field('age', 'integer')
>   )
>
> # controller
> def newdog():
>   form = SQLFORM(db.dog, fields=['name'], hidden={'age': 1})
>   if form.accepts(request, session):
>     response.flash = 'ok'
>   elif form.errors:
>     response.flash = 'not ok'
>   return dict(form = form)
>
> Any new entry in the dog table will have the age field set to 1.

Reply via email to