dropdown list Filter

Dear All ,

I have a text filed and dropdown list . Dropdown list displays all the cars with models and text field just sits top on the box . Any text enter in the text field should filter the dropdown list below .


<?php echo CHtml::textField('cFilter'); ?>

<?php echo CHtml::dropDownList("cars", '',CHtml::listData(MasterCars::model()->findAll(),'car_code','car_name'),array('size'=>20) );?>

Could someone please through me the best idea to implement this ?

Thanks for your help

hi,

i think this link can help you solve the problem.

By Example: CHtml

Thanks @jowen , But I couldn’t see solution there . My case is filtering dropdown box based on the text in the text field

How about using a C(Jui)AutoComplete widget instead?