Creating a Jquery autocomplete widget in Yii.

Creating a Jquery autocomplete widget in Yii.

Last updated:

This is how you would create a simple autocomplete widget in Yii 1.x

$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
                                'name'=>'technology-type-input',
                                'attribute'=>'client',
                                'source'=>StaticClass::method(),
                                // additional javascript options for the autocomplete plugin
                                'options'=>array(
                                    'minLength'=>'0',
                                ),
                                'htmlOptions'=>array(
                                    'class'=>'clearfix',
                                    'size'=>50
                                )
                            ));