Using CAutoComplete to display one value and submit another

Comparing #5 with #6

Revision #6 was created by Alex Muir Alex Muir on Jul 2, 2009, 6:02:04 AM.

Removed 'echo' from the $this->widget line - causes error in comments.

Content

[...]
</ol>

Now, in your view file, embed the following code within your form:

```php
<?php
echo $this->widget('CAutoComplete',
array(
//name of the html field that will be generated
'name'=>'user_name',
//replace controller/action with real ids
'url'=>array('controller/action'),
[...]