Hi In a Rails application i use text_with_autocomplete helper. My problem is in a Compose Message page : Imagine a textfield, where i should type my email adresses : i can type many emails separated by colon. - in the view : <%=text_field_with_auto_complete("message", "to", {:size =>90}, :skip_style => true) %> - My controller action splits the received string that could be ''me-tn31SVb8picAvxtiuMwx3w@public.gmane.org, yo'' , and does the search on the last string ''yo'' - The partial to show the list woould be then : <ul> <li id="user_1">you-tn31SVb8picAvxtiuMwx3w@public.gmane.org</li> <li id="user_2">yoman-tn31SVb8picAvxtiuMwx3w@public.gmane.org</li> </ul> My problem is now to append/replace in my text field the current value before autocompletion ( ''me-tn31SVb8picAvxtiuMwx3w@public.gmane.org, yo'' ) by : Imagine the selected value from the drop down list is ''yoman-tn31SVb8picAvxtiuMwx3w@public.gmane.org'' I''d like to split the textfield value, and replace the second string ''yo'' by ''yoman-tn31SVb8picAvxtiuMwx3w@public.gmane.org'', to have as a final result in the textfield : ''me-tn31SVb8picAvxtiuMwx3w@public.gmane.org, yoman-tn31SVb8picAvxtiuMwx3w@public.gmane.org'' I tried :before_update_element but that doesn''t work Any help would be appreciated --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---