You can play with <span class="informal"> which will be displayed, but not selected and <span style="display:none"> which won't be displayed, but selected.
You can do pretty much everything with that, so you won't need to moidfy autocompleter code.
Reagrds,
Nico
On 2/16/06, Joseph Potenza <[EMAIL PROTECTED]> wrote:
Hey all,When using the Ajax.autocompleter, how would I configure it so that the user is searching based on an entry's name, but once they select an entry, I record the ID?I have the user entering a person's name in a text box to make it easier to find contacts in a large database. I know that I can display content that doesn't end up in the textbox by using the "informal" class, but how can I associate the contact's ID with the LI item and have that value be recorded into a hidden field when selected?Is there an easier way than just putting a hidden, non-standard "contactId" attribute on my LI tags and then using the afterUpdateElement option?Thanks in advance,Joe
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs