I have a problem when using CActiveForm.checkBoxList
view file:
<?php echo $form->checkBoxList($model,'rightArray',array(
'1'=>'create',
'2'=>'update',
'3'=>'delete',
'4'=>'view',
),array('separator'=>'<br />','template'=>'{input} {label}')); ?>
model file:
class Manager extends CActiveRecord
{
/*
* Property in Model but not in DB
*/
public $password2;
public $rightArray=array();
//public $rightArray;
//i tried both
...
controller file:
$model->attributes=$_POST['Manager'];
var_dump($model);
after submit, var_dump()'s output:
public 'rightArray' =>
array
empty
i can get all other property expect this checkBoxList.
if i use:
$model->attributes=$_POST['Manager'];
$model->rightArray=$_POST['Manager']['rightArray'];
var_dump($model);
it worked.
anybody help?