i use ajax dropdown function for getting categories from types its working fine But problem is that when i am going to update my record the data is not maintained, it’s says me again to select dropDown value
here is my code
<div class="row">
<?php echo $form->labelEx($model,'type_id'); ?>
<?php echo CHtml::dropDownList('type_id','', $list1,
array(
'empty'=>'Select a Type', '',
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('entries/categorybytype'),
'update'=>'#cate_id',
)
)
);
?>
<?php echo $form->error($model,'type_id'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'cate_id'); ?>
<?php // echo $form->dropDownList($model, 'cate_id', $list, array('empty' => 'Select a state')); ?>
<?php echo CHtml::dropDownList('cate_id','', array('empty' => 'Select a state')); ?>
<?php echo $form->error($model,'cate_id'); ?>
</div>