On May 3, 2007, at 1:09 PM, Deco Rior wrote:

> In the case where they type a name and do not select from the list
> then the text box is populated but no id is populated. Is there a
> good way to insure a selection is made?

The plugin by default prevents this.

If the user edits the textfield the ID is untouched, and the string  
is restored at onblur to the last selected completion. Hopefully the  
user sees the rollback and notices his edition had no effect. I am  
not particularly satisfied with this behaviour, but it was the best  
solution I could think of, because the textfield needs to be editable  
so that the user can enter text to be completed.

On the other hand, if :allow_free_text is true then editions are  
allowed and monitored, if there's free text the ID becomes the empty  
string.

This is documented at the bottom of

   http://model-ac.rubyforge.org/classes/ModelAutoCompleterHelper.html

-- fxn


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to