Hey guys, So I've been messing around with tw.forms a little bit and maybe I'm looking in the wrong places but I'm having a little bit of trouble finding docs on some of the more advanced use cases.
The biggest thing I'm trying to figure out is how to return to the form after some custom validation in my "save" method. So I've got my "form" method that loads a template with the form and submits to the "save" method. I've got my @validate decorator on the "save" method which works great and goes back to the "form" method if any of the tw.form validators throw an error. All of that is working splendidly. However, I have some additional value-checking in the "save" method, and want to redirect them back to the "form" method and use tg.flash() to show something like "credit card declined". The bummer is that I can't figure out how to make the form *keep the input* they've already submitted. A redirect loses everything (tg.redirect converts POST to GET), and forces the user to re-input all form data. Having the "save" method 'return self.form(**kw)' doesn't seem to load the template from the "form" method. Also, I don't really want to make the 'save' method load a template because that's not its purpose. Please help shine some light on the subject for me. Any documentation links for more advanced tw.forms topics/examples would also be helpful. Thanks, Seth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

