# Please help newb - observe\_field?

**URL:** <https://www.ruby-forum.com/t/please-help-newb-observe-field/152721>\
**Category:** Rails\
**Created:** [November 6, 2008, 8:53pm UTC](https://www.ruby-forum.com/t/please-help-newb-observe-field/152721 "2008-11-06T20:53:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [November 6, 2008, 8:53pm UTC](https://www.ruby-forum.com/t/please-help-newb-observe-field/152721/1 "2008-11-06T20:53:40Z")

</div>

thanks everyone,

I am using an autocomplete text field with associations following ryan  
bates rails cast #102.

What i would like is when I autocomplete a customer name for their  
“customer address” to show up in an editable text field below.

i’m currently using an observe\_field, but not sure if this is the right  
way.

```auto

<%= text_field_with_auto_complete :workorder, :customer_name, {}, { :url
=> formatted_customers_path(:js), :method => :get, :with => "'search=' +
element.value" } %><br />
       <%= observe_field :workorder_customer_name,
         :url => { :controller => :customers, :action => :results },
         :frequency => 3
         %>
```

and i’ve been playing around with some rjs and partials with no success.  
I am very new to RoR, so any help would be appreciated, but it may have  
to be “dumbed down” 🙂

thanks for your time.

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [December 6, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/please-help-newb-observe-field/152721/2 "2008-12-06T19:19:38Z")

</div>

Hi Richard,

I have been posting like crazy to get achieve the same functionality.  
I found the autocomplete doesn’t use a regular input tag so you can’t  
use observe\_field on an autocomplete field. I did however find an auto-  
complete plugin that will pass the id from the model so you can use  
the id to lookup your information. I’m not sure how to implement it  
however. Once I get that info, I’ll let you know what I came up with.  
Here’s the link to the plugin, and if you already found this, or know  
what to pass to the observe\_field, I would be very thankful.

[http://model-ac.rubyforge.org/](http://model-ac.rubyforge.org/)

modelautocompleter is the name.

On Nov 6, 12:53 pm, Richard S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [December 6, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/please-help-newb-observe-field/152721/3 "2008-12-06T19:31:44Z")

</div>

Thanks Chris,

I’ve looked at that plugin and couldn’t firgure it out. not much  
documentation for it. But it does seem like it does what I would like.  
Thanks for the response, keep me posted on what you find, and I’ll do  
the same.
