I have two fields in a form.
One text field non asociated to the model for the user type a value.
<%= text_field_tag 'item_cod','', :size => 3 %>
Other a field with a select list with codes, names for the user
from. The view is:
<%= f.select :item_id, Item.select_list, :size => 40 %>
item_id is the real field of my model.
I want the following behavior.
1. If the user type a code into the text_field tag -> Update the list
the user view the corresponding name of the item they type.
2. If the user select from the list -> Update the text field with
code corresponding to the name selected. (this is the easy part)
My form works fine with one Observe field for the :item_id list but
can't do work the point 1.
Thanks in advance,