Be kind tell me how to pull through dropDownList elements from the database, while the elements that where the value of active = no appear in the list but you could not choose.
Now I do so.
<?php echo $form->dropDownList(
$model,'user', CHtml::listData(Driver::model()->findAll(),'id', 'last_name'),
array('prompt'=>'Select a driver:','options'=>array('3'=>array('disabled'=>'disabled')))); ?>
But this is not exactly what I need to get.
Now it turns out if ID (from the base) = 3, then the list item disabled. How to make that reconciliation was conducted with the active field which has 2 values yes / no.
Ideally, I need to get a drop-down list that’s like this:
example on jsfiddle
First displays the available items in the list , then those who are not active.