I want to add a back button before the submit button on a SQLFORM.
I don't understand how to use the button attribute, but from searching this 
should work (adding a button after the form is created)

but I don't see anything other than the submit button :(




def form_test(): #controller function
    form = SQLFORM(db.person)
    form.element(_type='submit').parent =  [
  TAG.button('Submit', _id="px-submit",_type="submit"),
  TAG.button('Reset',_id="px-clear",_type="reset"),
]
    if form.process().accepted:
       response.flash = 'form accepted, thanks!'
    elif form.errors:
       response.flash = 'form has errors'
    return dict(form=form)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to