in any case it should be at least form.vars.id. Don't know if it's
available inside the process() environment.
Even if it doesn't work, is it so hard to
if form.process().validate:
redirect(URL('whatever', args=form.vars.id))
?
On Wednesday, September 5, 2012 8:41:44 PM UTC+2, Philip
Should be accepted instead of validate:
form = SQLFORM(...).process()
if form.accepted:
... redirect(URL(..., args=form.vars.id))
On Wed, Sep 5, 2012 at 8:56 PM, Niphlod niph...@gmail.com wrote:
in any case it should be at least form.vars.id. Don't know if it's
available inside the process()
whoops, right:
form = SQLFORM(db.table)
if form.process().accepted:
redirect(URL('whatever', args=form.vars.id))
On Wednesday, September 5, 2012 9:00:10 PM UTC+2, Marin Pranjić wrote:
Should be accepted instead of validate:
form = SQLFORM(...).process()
if form.accepted:
...
Try:
SQLFORM(db.t_account).process(next=URL('account', 'index', args='t_account')
+ '/[id]')
If you put the variable name in brackets, it (plus the brackets) should get
replaced with the variable's value.
Also, .process (and .validate) take an onsuccess argument, which can be a
callable:
4 matches
Mail list logo