Assign the value within 2 pages (before save)

Greeting!

New Records Pages

(create.php)






<h2>New modules_tree</h2>





<div class="actionBar">


[<?php echo CHtml::link('Manage modules_tree',array('admin')); ?>]





</div>





<?php 


	echo $this->renderPartial('_form', array(


	'model'=>$model,


	'update'=>false,


)); 





?>





(_form.php)






<div class="yiiForm">





<p>


Fields with <span class="required">*</span> are required.


</p>





<?php echo CHtml::beginForm(); ?>





<?php echo CHtml::errorSummary($model); ?>





<div class="simple">


<?php echo CHtml::activeLabelEx($model,'main_module'); ?>


<?php


// $model->main_module=$myModuleSetup->module_id; 


echo CHtml::activeTextField($model,'main_module',array('size'=>15,'maxlength'=>15)); ?>





[<?php echo CHtml::link('New modules_tree',array('test')); ?>]








</div>


<div class="simple">


<?php echo CHtml::activeLabelEx($model,'sub_module'); ?>


<?php echo CHtml::activeTextField($model,'sub_module',array('size'=>15,'maxlength'=>15)); ?>








</div>


<div class="simple">


<?php echo CHtml::activeLabelEx($model,'pkValue'); ?>


<?php echo CHtml::activeTextField($model,'pkValue',array('size'=>60,'maxlength'=>200)); ?>


</div>





<div class="action">


<?php echo CHtml::submitButton($update ? 'Save' : 'Create'); ?>


</div>











<?php echo CHtml::endForm(); ?>





</div><!-- yiiForm -->





for the link "CHtml::link('New modules_tree',array('test'));"

it will call controller actionTest as below






	public function actionTest()


	{


	


	//HOW TO assign the model's value from previeous page into this page


		


	//for example 	$this->render('_form2',array('model'=>$model));


	


	}





Question:

within the _form.php, i key something into "main_module","sub_module" but no save yet , so i plan assign those value into another page call _form2 with same model by "CHtml::link('New modules_tree',array('test'));" ==> by controller action "actionTest" , is it possible do by YII?

i think you can use some cache concept or session concept…

Store it in the session within the first page and retrieve the data on the second page.