<div class="row">
<?php echo $form->labelEx($model,'aktif'); ?>
<?php echo $form->dropDownList($model, 'aktif', array(''=>'Seçiniz',0=>'Pasif', 1=>'Aktif'));?>
<?php echo $form->error($model,'aktif'); ?>
</div>
I am posting KurumsalSite Form but an attribute "aktif" which belongs to Kurumsalsite i can't assign to $model->attributes . When i assign to
if(isset($_POST['KurumsalSite']))
{
$model->attributes=$_POST['KurumsalSite'];
}
"$model->aktif" is always "1". But, when i use this assignment
$model->aktif = $_POST['KurumsalSite']['aktif']
it is working. In my database (database is mysql) aktif field is tinyint. I don't want to write extra code. What is the problem .

Help













