I have table types and i want to build selectbox with all values from this table
In my controller i wrote this code
$allRegistrationTypes = RegistrationType::model()->findAll();
$this->render('index', array('allRegistrationTypes' => $allRegistrationTypes))
How build selectbox in view file ?
Well then its pretty simple all you need to do is first create List Data like
for ex
now remember both id and type are fields in table
now all you have to do is if you are using form then
and if you need multiple you can pass
multiple => multiplein the array as htmlOptions