Hi all,
I'm trying to populate values to a dropdown list. The value is taken from a table. Using the code below, I can only get 1 value from the table although there should be several values that should be displaying.
echo $form->dropDownList($model,'vendbus', CHtml::listData(padcd::model()->findAll('reftyp =:business',array(':business' => 'business')), 'reftyp','refval'), array('empty'=>'select Type')); ?>
Thanks in advance
Page 1 of 1
Help On Dropdown List
#2
Posted 31 January 2013 - 07:50 AM
Hi, userp
Please use code formatting next time.
You're filling array having one key only: 'business'. Obviously, you'll have one value only in such array
Please use code formatting next time.
You're filling array having one key only: 'business'. Obviously, you'll have one value only in such array
#3
Posted 31 January 2013 - 08:37 AM
/* Moved from "Yii-powered Applications" to "General Discussion for Yii 1.1.x" */
Share this topic:
Page 1 of 1

Help













