How to 'validate' a Symfony form in steps - instead of calling $form->isValid()

Bart

New Member
I am using Symfony 1.3.6 on Ubuntu.I have a form with a lot of fields on it - rather than showing all the fields in one go (which may intimidate the user), I want to break up the form into stages, so that a user can fill in only the fields displayed, at each step/stage (kinda like a wizard).In order to do that, I need to write custom methods for the form, e.g.:\[code\]validateStep1();validateStep2();...validate StepN();\[/code\]Where in each of the functions above, I only validate a subset of the available widgets - i.e. I validate only the widgets displayed to the user in that step.In order to do that, it would be useful if I could call an isValid() method on widgets, however, I have looked at the sfWidget classes and there is no such isValid() method at the widget level.I don't want to hard code validation for each widget I am using, since this is not DRYDoes anyone know how I can check individual widgets in a form to see whether the user entered value(s) are valid?
 
Back
Top