Maybe you can check my post before here
From there you can use this in two ways of using dropdown list in yii framework
The first one is just like my post before :
<div class="row"> <?php echo $form->dropDownList($model,'country_id', CHtml::listData(Country::model()->findAll(), 'id', 'country_name'), array('empty'=>'Select Country'))?> </div>
And the other option is using CHtml::dropDownList like this suppose you have to make your view class with the Users model
<div class="row"> <?php echo CHtml::dropDownList('Users[country_id'],'', CHtml::listData(Country::model()->findAll(), 'id', 'country_name'), array('empty'=>'Select Country'))?> </div>That's the other option that you can choose..
It is really very helpful for us and I have gathered some important information from this blog. For more information about best Oracle training institutes please Click Here
ReplyDelete