YiiComplete ¶
This is Yii autocomplete extension using Jquery Ui. It enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.
Usage ¶
Requirements ¶
- Tested with Yii 1.1.14
- Jquery 1.10.2
- Jquery Ui 1.10.4 or above
Install ¶
- Download the latest release package http://www.yiiframework.com/extension/yii-auto-complete/files/YiiComplete.zip
- Unpack it in /protected/extensions/ folder
Usage ¶
- Paste the code into your view file
<?php
$this->widget('ext.YiiComplete.YiiComplete', array(
'jsonUrl' => '<url with json data(http://www.site.com/controller/JsonAction)>'
));
?>
- Json data should be in format:
[
{
"id": 1,
"label": "Car1",
"value": "Saab"
},
{
"id": 2,
"label": "Car2",
"value": "Audi"
},
{
"id": 3,
"label": "Car3",
"value": "Honda"
},
...
etc
]
Greate work!
Thanks for sharing.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.