# Help belongs\_to\_auto\_completer model\_auto\_completer

**URL:** <https://www.ruby-forum.com/t/help-belongs-to-auto-completer-model-auto-completer/145684>\
**Category:** Rails\
**Created:** [August 12, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/help-belongs-to-auto-completer-model-auto-completer/145684 "2008-08-12T22:18:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [August 12, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/help-belongs-to-auto-completer-model-auto-completer/145684/1 "2008-08-12T22:18:50Z")

</div>

hi,

im trying to integrate model\_auto\_completer. the dropdown is working  
nicely, my userdefined function:  
auto\_complete\_belongs\_to\_for\_X\_Y\_Z works as well, but then im stuck.  
via model\_auto\_completer\_result i can see the id, either attached to the  
model(eg account\_ID) or via my own partial:

 \<% for author in @authors %\> - \<%=h author.title %\>
 \<% end %\>

but what i wann do is: as soon the user selected one entry out of the  
dropdown, i need to populate the rest of the form with data related to  
the unique ID of that record. so\> how to i access the ID???

thx tom
