Hi members
Maybe my first ever, but I would thank you all for the information I could
absorve from this group, in years.
Here it goes:
Basically I'm try to manipulate the crud.messages.record_updated to flash a
custom message based on some validation (don't matter if it is pre or post
update)
So, I'm trying to update the value of crud.messages.record_updated inside
the crud.settings.update_onvalidation (or .update_onaccept) function(s).
What would be the best solution?
I tried something like this and obviously didn't work:
def my_validation(form):
if form.vars.my_checkbox is True:
crud.messages.record_updated = "My checkbox is true"
else:
crud.messages.record_updated = "My checkbox is false"
def my_controller():
crud.update(db.my_table)
crud.settings.update_onvalidation = my_validation
Thank you for you attention
Long live to web2py!
Rogerio Luz
--
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.