I am trying to add categories to my CJuiAutoComplete. I am following these instructions: jqueryui.com/autocomplete/#categories and I have the following in my view:
$this->widget('zii.widgets.jui.CJuiAutoComplete', array( 'attribute'=>'suburb_city', 'sourceUrl' => $this->createUrl('site/autoGeoLookup'), 'name'=>'q', 'options'=>array( 'showAnim' => 'fold', 'minLength'=>'2', 'widget' => '"custom.catcomplete", $.ui.autocomplete, { _renderMenu: function( ul, items ) { var that = this, currentCategory = ""; $.each( items, function( index, item ) { if ( item.category != currentCategory ) { ul.append( "<li class=\'ui-autocomplete-category\'>" + item.category + "</li>" ); currentCategory = item.category; } that._renderItemData( ul, item ); }); } }', ), 'htmlOptions'=>array( 'size'=>45, 'maxlength'=>45, ),
And the CJuiAutocomplete doesn't display the categories. Any hint?
Thanks for your help!