Yii documentation help


(Nourann) #1

Hi,

I am new to Yii, I was checking CJuiAutoComplete example

$this->widget(‘zii.widgets.jui.CJuiAutoComplete’, array(

‘model’=>$model,

‘attribute’=>’…’,

‘source’=>$this->createUrl(’…’),

‘options’=>array(

 'showAnim'=>'fold',


 'select'=>"js: function(event, ui) {


     $('#address').val(ui.item['address']);


     $('#city').val(ui.item['city']);


     .....


 }"

)

));

how did they knew that ui will have item property?


(Ft07) #2

That’s jquery ui.

Have a look here

https://jqueryui.com/autocomplete