In order to have the autocompleter save a value back to a hidden field
I propose the following patch/change:
In controls.js, change the following lines:
<code>
if (this.options.select) {
var nodes = document.getElementsByClassName(this.options.select,
selectedElement) || [];
if(nodes.length>0) value = Element.collectTextNodes(nodes[0],
this.options.select);
</code>
to:
<code>
if (this.options.select) {
if (this.options.hiddenField)$(this.options.hiddenField).value =
Element.collectTextNodesIgnoreClass(selectedElement,
this.options.select);
var nodes = document.getElementsByClassName(this.options.select,
selectedElement) || [];
if(nodes.length>0) value = Element.collectTextNodes(nodes[0],
this.options.select);
</code>
this will allow in conjunction with the "select"-option the
autocompleter to save the unselected text to a hidden field
--~--~---------~--~----~------------~-------~--~----~
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 [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-spinoffs
-~----------~----~----~----~------~----~------~--~---