Hi,
i tried to post earlier today but it didn't seem to go through. so please
forgive me if this appears to be a double post.
i am using onvalidation to call a check on the content of the form vars.
if the content matches i would like to stop the form being saved in to the
database . i know i could redirect but my form does not carry the args for
this , i guess i could put them in but wondered if there was just a way to
quit the insert.
def formcheck(form):
check = ["word one", "word two", "three"]
for x in check:
if x.upper() in form.vars.body.upper():
response.flash = T("Content Not Allowed")
Thanks
--
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.