Can not pass value different page
Posted 25 June 2010 - 07:32 AM
I have little problem when I pass the value one page to another. From page one, I have dropdown from different table and want to pass the value (start_date) to another page. here is my view file
page1 view file:
<td><?php echo CHtml::activeLabel($form,'start_date'); ?></td>
$criteria = new CDbCriteria;
$criteria->order = 'start_date';
echo CHtml::activeDropDownList($form,'start_date',CHtml::listData(Test::model()->findAll($criteria),'id','start_date'), array('prompt'=>'Please select Start Date'));
page 1 controller
public function actionReport()
Posted 25 June 2010 - 08:49 AM
If I'm right on this, by doing the redirect, these variables will be available in the actionView method as $_GET parameters. You would then have to pass whatever information you still need to the render function. Why not just call render here and pass the $form object? $this->render('view',array('form'=>$form)); Does this help at all?
Posted 25 June 2010 - 09:01 AM
problem solved. I declare variable in my model. that it. thanks.