Assign the value within 2 pages (before save)


New Records Pages


<h2>New modules_tree</h2>

<div class="actionBar">

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



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






<div class="yiiForm">


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


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

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

<div class="simple">

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


// $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 class="simple">

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

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


<div class="simple">

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

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


<div class="action">

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


<?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));




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.