34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
Custom Autocomplete Display and Value Submission
Comparing
#2
with
#3
Revision #3 was created by
SebK
on Jun 7, 2012, 8:09:10 PM.
changen minChars to minLength.
« Previous (#2)
Content
[...]
'source' => $this->createUrl('test/autocomplete'),
// attribute_value is a custom property that returns the
// name of our related object -ie return $model->related_model->name
'value' => $model->isNewRecord ? '': $model->attribute_value,
'options' => array(
'min
Chars
Length
'=>3,
'autoFill'=>false,
'focus'=> 'js:function( event, ui ) {
$( "#test_autocomplete" ).val( ui.item.name );
return false;
}',
[...]