Difference between #9 and #10 of
Using CAutoComplete to display one value and submit another

Revision #10 has been created by samdark on Aug 28, 2011, 2:21:51 AM with the memo:

added deprecation note
« previous (#9) next (#11) »

Changes

Title unchanged

Using CAutoComplete to display one value and submit another

Category unchanged

Tutorials

Yii version unchanged

Tags changed

deprecated, CAutoComplete

Content changed

> Note: CAutoComplete is deprecated since Yii 1.1.3. Consider using CJuiAutoComplete.
 
 
Have you ever wanted to use an auto-complete field to look up a user or some other data, but want the database ID of that user or data returned as well so that you can more easily perform some function when the form is submitted? Thanks to [Yii's CAutoComplete widget](http://www.yiiframework.com/doc/api/CAutoComplete) and [jQuery's Autocomplete plugin](http://plugins.jquery.com/project/jq-autocomplete), it's really quite simple.

In overview, assuming that you are looking up and retrieving your data set for the autocomplete widget from a database, there are basically three steps:

<ol>
<li>write action code to query and produce a properly-formatted list of autocomplete items</li>
[...]
7 3
11 followers
Viewed: 64 417 times
Version: 1.1
Category: Tutorials
Written by: luoshiben
Last updated by: mohammad sharif ahrari
Created on: Mar 25, 2009
Last updated: 11 years ago
Update Article

Revisions

View all history