Re: [web2py] How to compute Field on update based on previous value.

2012-05-01 Thread François Delpierre
Thanks Khalil, I did a try but it did not work, in fact the form.vars.t_revision does not exists. 1. Could it be because I'm using SQLFORM.grid ? 2. I was aware that we can paste a list to onvalidation, but never a dict ( onvalidation={'onsuccess':mycustom} ), is this in the docs ? I would have

Re: [web2py] How to compute Field on update based on previous value.

2012-05-01 Thread Khalil KHAMLICHI
there is a typo : form = SQLFORM( t_templates, record) should be form = SQLFORM( db.t_templates, record) On Tue, May 1, 2012 at 12:13 PM, Khalil KHAMLICHI < khamlichi.kha...@gmail.com> wrote: > this might not be the perfect solution but it might let you move on > > models : > db.define_table('

Re: [web2py] How to compute Field on update based on previous value.

2012-05-01 Thread Khalil KHAMLICHI
this might not be the perfect solution but it might let you move on models : db.define_table('t_templates', Field('f_template', type='upload', label=T('File'),notnull=True), Field('f_revision', type='integer', label=T('Revision'), default=1, * writable=False, #hide

[web2py] How to compute Field on update based on previous value.

2012-05-01 Thread François Delpierre
Hi, Here is exactly what I would like to have, but it does not compute on update : db.define_table('t_templates', Field('f_template', type='upload', label=T('File'),notnull=True), Field('f_revision', ty