web2py a form for processing a value -
this simple, sorry in advance! have form defined in model file:
db.define_table('table1', field('x', 'integer'))
i have controller defined as:
def index(): form = sqlform(db.x) return dict(form=form)
in index view file have:
<h2>input form</h2> {{=form}}
i want use value x in scheduler defined model like:
a = x+2
the form shows expected. enter value in , submit it. scheduler running expected. looks value x never gets set enter. idea?
if want submitted value inserted in database, need process form:
def index(): form = sqlform(db.x).process() return dict(form=form)
once value has been inserted in database, should available scheduler task access.
Comments
Post a Comment