Dear Yii Users,
I am not grasping the concept well to achieve my desired result and hoping for pointers here.
I am creating a dropdown with multiple selection from another model to store in database. I have a concept to use implode/explode but as I am still getting the hang of Yii, I am taking one step at a time.
My datatype for the field is "Varchar" and below is my code for _form:
<div class="row">
<?php echo $form->labelEx($model,'site_staff'); ?>
<?php //echo $form->textField($model,'site_staff',array('size'=>60,'maxlength'=>255)); ?>
<?php //echo $form->dropDownList($model,'site_staff', CHtml::listData(Biodata::model()->findAll(), 'full_name', 'full_name'), array('empty'=>'Select')); ?>
<?php echo $form->dropDownList($model,'site_staff',
CHtml::listData(Biodata::model()->findAll(), 'full_name', 'full_name'),
array('empty'=>'','multiple'=>true));
?>
<?php echo $form->error($model,'site_staff'); ?>
</div>
It is returning me the following error:
Please fix the following input errors:
Site Staff is invalid.
Thank you for any suggestions.