[TYPO3-mvc] Multi step forms and validation
Nikolas Hagelstein
lists at shr-now.de
Tue Oct 27 19:01:50 CET 2009
Hi,
after thinking and playing around for a while I came across the following
solution:
After success full validation I do store the fields within a session
container.
In initializeAction I compare this session container with
$this->arguments->getArgumentNames() and manipulate
$this->request->arguments, if the particular field is found within the
session but is not set within the current request.
Works quite well that far. Furthermore I could assign $this->arguments or
the fields from the session to the view automatically.
There is one draw back using this method:
ATM Validators are not aware of the controller's request argument
.
So if you need to compare a certain field to another one of the request
(e.g. password and passwordConfirmation)
you need to access $_POST/$_GET directly.
I this case you have to manipulate manipulate $this->request->arguments as
well as $_POST or $_GET(pretty ugly).
I ll try to put together a generic MultiStepFormController if I find time.
Cheers,
Nikolas
More information about the TYPO3-project-typo3v4mvc
mailing list