Where is the Yii2 autocomplete class?
1 answer
You must first install the Yii 2 JQuer UI extension . Fully qualified class name with the yii \ jui \ Autocomplete namespace . You can use it like this:
use yii\jui\Autocomplete;
...
echo AutoComplete::widget([
'name' => 'file',
'clientOptions' => [
'source' => ['USA', 'RUS'],
],
]);
or
echo yii\jui\AutoComplete::widget([
'name' => 'file',
'clientOptions' => [
'source' => ['USA', 'RUS'],
],
]);
+5
source to share