chech this http://web2py.com/books/default/chapter/29/07?search=onupdate
may help. On Wed, Oct 3, 2012 at 9:49 PM, alex <a22...@gmail.com> wrote: > > I have a SQLFORM.grid. > When the user updates field 'a' in the grid, before submitting the form, > field 'b' should represent a calculation based on value of 'a'. > For instance b=a+1 > > db.py > db.define_table('t', > Field('a', type='integer'), > Field('b', type='integer') > ) > > default.py > def index(): > grid = SQLFORM.smartgrid(db.t) > return locals() > > index.html > {{extend 'layout.html'}} > {{=grid}} > > Someone can help? > > -- > > > > --