Simply do this:
def delete_something():
form = SQLFORM.factory(Field('delete','boolean'))
btn = form.element("input",_type="submit")
btn["_onclick"] = "return confirm('Are you sure?');"
If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!
Simply do this:
def delete_something():
form = SQLFORM.factory(Field('delete','boolean'))
btn = form.element("input",_type="submit")
btn["_onclick"] = "return confirm('Are you sure?');"
Comments (0)