Best practice for multi-step selection forms?


I am developing a website which requires that you first select some data in a form (i.e. choose some time period), based on this selection I will redirect the user onto another form where there user can select some more stuff based on the previous selections.

For example I have this form with the corresponding model



In the controller I process this like this:

// collect user input data




	// validate user input and redirect to previous page if valid






This works fine, but as I get further in this multi-step process I am passing a lot of GET variables which I do not like. Rather I wanted to do something like pass the model instances of the previous models to the next action, so instead of calling redirect I would call:


This works fine, but when I render the view in the sport action it simply adds the sport view to the period view, how do I clear the view from the previous step?

And in general is there better practice for doing something like this? Where I have multiple forms that depend on the data from the previous forms (f.ex. like when you shop online and go through multiple steps and would like to be able to jump back and forward in the various checkout steps, how is it best to maintain what has been selected in checkbox etc. in all the different steps).

This was more complex to explain than I anticipated, hope this made sense to someone!

Thanks for any thoughts on this

Forget about this post, I solved this very nicely using a single model to collect all the data gathered through this multi-step process ;)


I got the same issue with you. I am using module, but when calling this->redirect(array("control/show"); I do not have any reference to the model? How do you handle this?