Hi! I have the following question about using htmlfill on Turbogears:

"How to return the form with the data previously typed by the user, if errors were found by the formencode.validators()"?

The main question is: validation_error() can't access valid submitted values, so how do I send them back to the user?

Sorry for the previous newbie e-mail (incomplete...). ^_^

Thanks,

Alexandre
--------------------------------
        def newForm(self):

                form = widgets.TableForm("FormType",
                        widgets.TextField(name="number", label="Type an Int number:")
                        action      = "processForm",
                        submit_text = ...
                return dict(form=form)

        @validate(validators={"number"  : validators.Int()})
        def processForm(self, number):

                ...(save in the database, return ok to user)...

        def validation_error(self, function_name, kw, errors) # called by the validator

                 ....


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to