On Mon, Sep 29, 2008 at 7:13 AM, Vinay <[EMAIL PROTECTED]> wrote: > 1.User starts typing > 2.Autocomplete kicks off and returns matching strings in relevant > attributes and Model. > 3.User scrolls down options and selects the one he/she wants. > 4.Selected option appears on the text box > 4a.Text appearing in text box may be different from that shown to > user in options list. Like in the Scriptaculous > customised_autocomplete demo. > 5.When the form is submitted -> The autocomplete field may be either a > virtual attribute or otherwise. The field is for a belongs_to > associated model so ultimately, the foreign key must be set (in my > case, its contact_id for a Create/Edit Reminder form).
Just in case, model_auto_completer addresses this use case. You autocomplete a belongs_to association and get an ID or else (if :allow_free_text), get a new value. > _list.html.erb > <ul> > <%- for contact in @contacts do -%> > <li> > <div><%=h contact.name %></div>|<div><%=h contact.email %></div>| > <div><%=h contact.company.name %></div> > </li> > <%- end -%> > </ul> Try removing the DIVs somehow, sometimes even spaces around a LI content may result in weird behaviour in some browsers. Once you get it working, add stuff incrementally. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

