* @link http://www.yiiframework.com/ * @copyright 2008-2013 Yii Software LLC * @license http://www.yiiframework.com/license/ */ Yii::import('zii.widgets.jui.CJuiInputWidget'); /** * CJuiAutoComplete displays an autocomplete field. * * CJuiAutoComplete encapsulates the {@link http://jqueryui.com/autocomplete/ JUI * autocomplete} plugin. * * To use this widget, you may insert the following code in a view: *
* $this->widget('zii.widgets.jui.CJuiAutoComplete',array(
* 'name'=>'city',
* 'source'=>array('ac1','ac2','ac3'),
* // additional javascript options for the autocomplete plugin
* 'options'=>array(
* 'minLength'=>'2',
* ),
* 'htmlOptions'=>array(
* 'style'=>'height:20px;',
* ),
* ));
*
*
* By configuring the {@link options} property, you may specify the options
* that need to be passed to the JUI autocomplete plugin. Please refer to
* the {@link http://api.jqueryui.com/autocomplete/ JUI AutoComplete API}
* documentation for possible options (name-value pairs) and
* {@link http://jqueryui.com/autocomplete/ JUI AutoComplete page} for
* general description and demo.
*
* By configuring the {@link source} property, you may specify where to search
* the autocomplete options for each item. If source is an array, the list is
* used for autocomplete. You may also configure {@link sourceUrl} to retrieve
* autocomplete items from an ajax response.
*
* @author Sebastian Thierer