Ok i have tried the default argument , but the issue is that the form is going to be generated with the saved_on value already set instead of generating the value if the submited values are stored and validated. I have seen in the doc that we could use onvalidation , is that the right way to do it ( onvalidation is going to set the correct value for this saved_on field )?
On Thu, Sep 30, 2010 at 8:16 PM, mdipierro <[email protected]> wrote: > 'date' is not a valid field name and it may cause trouble. Let's use > saved_on > > you can do > > db.define_table('test', > Field('message'), > > Field('saved_on','datetime',default=request.now,writable=False,readable=False), > ) > > and then you can use > > form = crud.create(db.test) > > On Sep 30, 12:00 pm, Manu <[email protected]> wrote: >> Hi >> I need some help with a simple thing , >> My DB is defined this way : >> >> db.define_table('test', >> Field('message'), >> Field('date',datetime), >> ) >> >> I would like to ensure that when the form is created with form = >> crud.create('test') , that when i submit my form the timestamp is >> updated with the insert time not the generated one at crud.create time >> ( we can have minutes between these two ). >> >> Thx >

