Hi all,
I am still very new to Yii, so hopefully my question is not too silly. I would like to use a 3 step form in a second controller. The first 2 steps of the form are the same, but then it changes according to where I came from originally. If I can, then I would like to keep my URL on top, so people do not get confused that I have changed into a different section.
I now wanted to use the following code.
first controller
public function actionCreate()
{
// Check the route to identify where the user came from
if( Yii::app()->controller->route == 'firstController/create'){
$model->location = 'firstController';
else{
$model->location = 'secondController';
}
}
second controller
public function actionCreate()
{
Yii::app()->runController('firstController/create');
}
Unfortunately, ii only shows me the route from the first Controller and never the second controller. How can I achieve that? Yes I know, I could set a Session as well, but I would like to see if this approach is possible.
How can I achieve that?