Hi, How to trigger the text_field_with_auto_complete after typing the 4 characters on the text box.can anyone please tell me how set this after typing 4 characters. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Sep 16, 2008 at 1:17 PM, Palani Kumar <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> How to trigger the text_field_with_auto_complete after typing the 4 > characters on the text box.can anyone please tell me how set this after > typing 4 characters.If you want the widget to trigger the Ajax call only if 4 chars or more were entered have a look at the :min_chars option: http://github.com/rails/auto_complete/tree/master/lib/auto_complete_macros_helper.rb --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, Any one please help to me solve the problem in text_field_with_auto_complete. I want to call the auto_complete AJAX function only after i enter 4 characters. To do this i have included the "min_chars" option. My code is <%= text_field_with_auto_complete :detail, :title, {:min_chars => 4} %> But this is not working . Am i doing any mistakes? Pls. help me!!!!!!!!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Sep 16, 2008 at 3:37 PM, Palani Kumar <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> <%= text_field_with_auto_complete :detail, :title, {:min_chars => 4} %>The signature of the helper is text_field_with_auto_complete(object, method, tag_options = {}, completion_options = {}) So you need to put an explicit empty tag_options this way: <%# untested %> <%= text_field_with_auto_complete :detail, :title, {}, :min_chars => 4 %> --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Xavier Noria wrote:> On Tue, Sep 16, 2008 at 3:37 PM, Palani Kumar > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> <%= text_field_with_auto_complete :detail, :title, {:min_chars => 4} %> > > The signature of the helper is > > text_field_with_auto_complete(object, method, tag_options = {}, > completion_options = {}) > > So you need to put an explicit empty tag_options this way: > > <%# untested %> > <%= text_field_with_auto_complete :detail, :title, {}, :min_chars => 4 > %>Hi Xavier Noria, It works for me .Thank you so much man thank you so much.... great work done by you... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---