Yii Framework Forum: Yii documentation help - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii documentation help Rate Topic: -----

#1 User is offline   Baso 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 09-January 17

Posted 24 April 2017 - 03:12 AM

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?
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,832
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 24 April 2017 - 04:09 AM

That's jquery ui.

Have a look here
https://jqueryui.com/autocomplete
Don't forget to read The Definitive Guide to Yii (1.1/2.0 en) | The class reference (1.1/2.0) has the details
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users