Start small: you're missing how forms work in self-submitting controllers
(which is the de-facto standard in pretty every framework)...
def testfunction():
#..... this piece gets called when you render the form AND when you
submit it
form = SQLFORM(....) #... this creates the form and manages tokens
if form.process().accepted:
#....... this gets called ONLY when the form is submitted (not
in the render stage)
elif form.errors:
#...... this gets called ONLY when the form has been submitted
but there are validation errors (not in the render stage)
else:
#...... this gets called ONLY when the form is rendered (not in
the submit stage)
return dict(form=form)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.