# Auto\_complete galore

**URL:** <https://www.ruby-forum.com/t/auto-complete-galore/59090>\
**Category:** Rails\
**Created:** [April 28, 2006, 4:28pm UTC](https://www.ruby-forum.com/t/auto-complete-galore/59090 "2006-04-28T16:28:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7bcc69/32.png) [@mich](https://www.ruby-forum.com/u/mich)\
**Post date:** [April 28, 2006, 4:28pm UTC](https://www.ruby-forum.com/t/auto-complete-galore/59090/1 "2006-04-28T16:28:41Z")

</div>

List,

I’m using auto\_complete with textfield, called CompanyCode. so when you  
type fx ‘0403’ it will show a list with matching company codes, and the  
respective company name - like so:

040333 - Some company inc  
040322 - Another company  
040323 - whatever Corp.

Anyway, once a user selects one of the entries from the list - the whole  
text (name and code) is put into the textfield. However, I would like to  
put the full code into the CompanyCode field, and the name into another  
field, fx CompanyName.

Any ideas ?

Thanks.

/mich

---

<div class="post-metadata">

**Author:** ![mich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7bcc69/32.png) [@mich](https://www.ruby-forum.com/u/mich)\
**Post date:** [April 25, 2007, 12:03pm UTC](https://www.ruby-forum.com/t/auto-complete-galore/59090/2 "2007-04-25T12:03:08Z")

</div>

I am another lost newbie stalled at the same issue. Must be an approach  
I am taking.

thanks in advance for any pointers
