<?xml version='1.0' encoding='utf-8' ?>
<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>
  <channel>
    <title>Wolfmans Howlings: Having multiple text_field_with_auto_complete in the same view</title>
    <link>http://blog.wolfman.com/articles/2006/10/17/having-multiple-text_field_with_auto_complete-in-the-same-view</link>
    <description>A programmers Blog about Ruby, Rails and a few other issue</description>
    <language>en-us</language>
    <ttl>40</ttl>
    <item>
      <title>Having multiple text_field_with_auto_complete in the same view</title>
      <description>
        &lt;p&gt;I ran into a problem using &lt;code&gt;text_field_with_auto_complete&lt;/code&gt; in a view
        where I wanted to have many of them created by an iteration. You can
        use the :index option for the &lt;code&gt;text_field&lt;/code&gt;, but it doesn't carry over to
        the various divs used in the AJAX calls.&lt;/p&gt;
        
        &lt;pre&gt;&lt;span class=&quot;punct&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;upto&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;legi&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;punct&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
        &amp;lt;% @leg= @mission.legs.find(:first, :conditions =&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;['&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;legnum = ?&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;',&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;legi&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
        text_field_with_auto_complete( :leg, :name, {:index =&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;legi&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;symbol&quot;&gt;:size&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;})&lt;/span&gt;
        &lt;span class=&quot;punct&quot;&gt;&amp;lt;%&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
        &amp;lt;% end %&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;/pre&gt;
        
        &lt;p&gt;is what you really want to do, just as for a regular text_field.&lt;/p&gt;
        
        &lt;p&gt;I googled around and found &lt;a href=&quot;http://dev.rubyonrails.org/ticket/5983&quot;&gt;this bug
        report&lt;/a&gt; for a fix to
        &lt;code&gt;text_field_with_auto_complete&lt;/code&gt; that allows :index, as that fix does not
        appear to be in the current stable release of Rails or on Edge rails, I just created a
        &lt;code&gt;my_text_field_with_auto_complete&lt;/code&gt; and it worked like a charm!!&lt;/p&gt;
        
        &lt;pre&gt;  &lt;span class=&quot;keyword&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;method&quot;&gt;my_text_field_with_auto_complete&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;method&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;tag_options&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{},&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;completion_options&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{})&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;tag_options&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:index&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;])&lt;/span&gt;
              &lt;span class=&quot;ident&quot;&gt;tag_name&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&lt;span class=&quot;expr&quot;&gt;#{object}&lt;/span&gt;_&lt;span class=&quot;expr&quot;&gt;#{tag_options[:index]}&lt;/span&gt;_&lt;span class=&quot;expr&quot;&gt;#{method}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt;
              &lt;span class=&quot;ident&quot;&gt;tag_name&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&lt;span class=&quot;expr&quot;&gt;#{object}&lt;/span&gt;_&lt;span class=&quot;expr&quot;&gt;#{method}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;end&lt;/span&gt;
        
            &lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;completion_options&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:skip_style&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;auto_complete_stylesheet&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;+&lt;/span&gt;
                &lt;span class=&quot;ident&quot;&gt;text_field&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;method&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;tag_options&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;+&lt;/span&gt;
                &lt;span class=&quot;ident&quot;&gt;content_tag&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;,&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;,&lt;/span&gt; &lt;span class=&quot;symbol&quot;&gt;:id&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;tag_name&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;_auto_complete&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;,&lt;/span&gt; &lt;span class=&quot;symbol&quot;&gt;:class&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;auto_complete&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;)&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;+&lt;/span&gt;
                &lt;span class=&quot;ident&quot;&gt;auto_complete_field&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;tag_name&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;symbol&quot;&gt;:url&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;symbol&quot;&gt;:action&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;auto_complete_for_&lt;span class=&quot;expr&quot;&gt;#{object}&lt;/span&gt;_&lt;span class=&quot;expr&quot;&gt;#{method}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;}.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;completion_options&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;))&lt;/span&gt;
          &lt;span class=&quot;keyword&quot;&gt;end&lt;/span&gt;
        &lt;/pre&gt;
        
        &lt;p&gt;So I put this in app/helpers/application_helper.rb and simply use
        &lt;code&gt;my_text_field_with_auto_complete&lt;/code&gt; in my views.&lt;/p&gt;
        
        &lt;p&gt;Here is what the controller side looks like...&lt;/p&gt;
        
        &lt;pre&gt;  &lt;span class=&quot;keyword&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;method&quot;&gt;auto_complete_for_leg_name&lt;/span&gt;
            &lt;span class=&quot;ident&quot;&gt;leg&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:leg&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# get index as its always only one at a time&lt;/span&gt;
            &lt;span class=&quot;ident&quot;&gt;auto_complete_responder_for_name&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:leg&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;leg&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:name&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;]&lt;/span&gt;
          &lt;span class=&quot;keyword&quot;&gt;end&lt;/span&gt;
        &lt;span class=&quot;punct&quot;&gt;...&lt;/span&gt;
        &lt;span class=&quot;ident&quot;&gt;private&lt;/span&gt;
          &lt;span class=&quot;keyword&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;method&quot;&gt;auto_complete_responder_for_name&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;ident&quot;&gt;param&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;downcase&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;
            &lt;span class=&quot;ident&quot;&gt;find_options&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;symbol&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;LOWER(lname) LIKE ?&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;',&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;param&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;],&lt;/span&gt;
              &lt;span class=&quot;symbol&quot;&gt;:order&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;lname ASC&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;',&lt;/span&gt;
              &lt;span class=&quot;symbol&quot;&gt;:limit&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;6&lt;/span&gt;
            &lt;span class=&quot;punct&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;attribute&quot;&gt;@names&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;find_options&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;ident&quot;&gt;render&lt;/span&gt; &lt;span class=&quot;symbol&quot;&gt;:partial&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;names&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;
          &lt;span class=&quot;keyword&quot;&gt;end&lt;/span&gt;
        
        &lt;/pre&gt;
        
        &lt;p&gt;&lt;a href=&quot;http://technorati.com/tag/text_field_with_auto_complete+multiple&quot; rel=&quot;tag&quot;&gt;&lt;/a&gt;
        &lt;a href=&quot;http://technorati.com/tag/text_field_with_auto_complete&quot; rel=&quot;tag&quot;&gt;&lt;/a&gt;&lt;/p&gt;
      </description>
      <author>Jim Morris</author>
      <pubDate>Tue, 17 Oct 2006 23:45:47 -0700</pubDate>
      <link>http://blog.wolfman.com/articles/2006/10/17/having-multiple-text_field_with_auto_complete-in-the-same-view</link>
      <guid isPermaLink='false'>urn:uuid:2a0bb86c-9179-425f-9f0c-785a7eeb3a52</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Kevin Olbrich</title>
      <description>Nice work.  One problem I see.  When the parameters get serialized, you end up with something like   {&quot;object&quot;=&gt;{&quot;index&quot;=&gt;&quot;value&quot;}} in the params, which confuses the standard `auto_complete_for handler`.</description>
      <pubDate>Wed, 18 Oct 2006 04:36:18 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-38</link>
      <guid isPermaLink='false'>urn:uuid:73685d68-53fc-4534-af93-07dee54115c8</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Kevin Olbrich</title>
      <description>Whoops, no.  Actually it does work.</description>
      <pubDate>Wed, 18 Oct 2006 04:50:16 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-39</link>
      <guid isPermaLink='false'>urn:uuid:ce095b28-a99d-457a-8164-4e5570fbd459</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by wolfman</title>
      <description>Good point I'll add the controller side of the code too, as it does work.</description>
      <pubDate>Wed, 18 Oct 2006 09:31:17 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-35</link>
      <guid isPermaLink='false'>urn:uuid:47ef275b-c190-4674-a880-f576bba39bf1</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by kevin hutchison</title>
      <description>
        Can i ask how the responder knows which partial to render? Or does it render all name partials?
        
        thanks much,h
      </description>
      <pubDate>Sun, 29 Oct 2006 11:12:06 -0800</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-36</link>
      <guid isPermaLink='false'>urn:uuid:4f7033f8-1e8a-42ee-a0fb-33d771235e38</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by wolfman</title>
      <description>kevin- it will render the partial called `_names.rhtml` in the relevant views directory. There is only one partial used in this case. Maybe I misunderstood your question?</description>
      <pubDate>Sun, 29 Oct 2006 13:08:54 -0800</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-37</link>
      <guid isPermaLink='false'>urn:uuid:3ff9a1eb-6c3a-40fb-96ed-501471b4d5a3</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by ThirtyTwo</title>
      <description>Well done.  Thank you.</description>
      <pubDate>Tue, 31 Oct 2006 05:24:41 -0800</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-40</link>
      <guid isPermaLink='false'>urn:uuid:890ad241-15a8-4666-8e30-6daafe1a0dea</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by arun agrawal</title>
      <description>thanks</description>
      <pubDate>Wed, 27 Jun 2007 07:10:27 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-33</link>
      <guid isPermaLink='false'>urn:uuid:ce19b0db-4477-4f8a-9bd0-25f2cbecec74</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by arun agrawal</title>
      <description>i need a default value in text box when i came that page. and when i just delete the value manually and type another then the auto text will apppear</description>
      <pubDate>Wed, 27 Jun 2007 07:15:33 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-34</link>
      <guid isPermaLink='false'>urn:uuid:26655b44-054d-49a9-8724-6002b3b25449</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Bala</title>
      <description>I Tried this example i couldnt able to list the details but i can able to retrieve the datas what would be the problem? plz help me guyz,  one of the requirements to my project.</description>
      <pubDate>Thu, 12 Jul 2007 04:29:39 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-41</link>
      <guid isPermaLink='false'>urn:uuid:85028f43-9cc5-4f9e-922a-b41414f2564a</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by wolfmanjm</title>
      <description>Can you email me the details? I don't really understand what problem you are having.</description>
      <pubDate>Thu, 12 Jul 2007 16:31:33 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-42</link>
      <guid isPermaLink='false'>urn:uuid:301d7eb2-6a3c-4e0d-845b-c2315ad021b5</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Bala</title>
      <description>
        # Controller.
        
          def user_auto_complete
            name= params[:user].keys[0] # get index as its always only one at a time
            responder_auto_complete_for_user_name(params[:user][name][:name])
          end
        
        
        
          private
          def responder_auto_complete_for_user_name(value)
            param= '%' + value.downcase + '%'
            find_options= {
              :conditions =&gt; [ 'name like ?', param ], :order =&gt; 'name ASC', :limit =&gt; 60
            }    
            @names = User.find(:all, find_options)
            render :partial =&gt; 'names'
            #render :update do |page|
              #page['user_1_name_auto_complete'].show
              #page['user_1_name_auto_complete'].replace :partial =&gt; &quot;names&quot;
            #end
          end
        
        
        # Application helper
        
        
        
        module ApplicationHelper
        
        
          def my_text_field_with_auto_complete(object, method, tag_options = {}, completion_options = {})
            if(tag_options[:index])
              tag_name = &quot;#{object}_#{tag_options[:index]}_#{method}&quot;
            else
              tag_name = &quot;#{object}_#{method}&quot;
            end
            puts &quot;Tag Name = &gt; &quot; + tag_name
            (completion_options[:skip_style] ? &quot;&quot; : auto_complete_stylesheet) +
                text_field(object, method, tag_options) +
                content_tag(&quot;div&quot;, &quot;&quot;, :id =&gt; tag_name + &quot;_auto_complete&quot;, :class =&gt; &quot;auto_complete&quot;) +
                auto_complete_field(tag_name, { :url =&gt; { :action =&gt; &quot;auto_complete_for_#{object}_#{method}&quot; } }.update(completion_options))
          end
        
          def auto_complete_text_one(object, method, tag_options = {}, completion_options = {})
            if(tag_options[:index])
              tag_name = &quot;#{object}_#{tag_options[:index]}_#{method}&quot;
            else
              tag_name = &quot;#{object}_#{method}&quot;
            end
            (completion_options[:skip_style] ? &quot;&quot; : auto_complete_stylesheet) +
            text_field(object, method, tag_options) +
            content_tag(&quot;div&quot;, &quot;&quot;, :id =&gt; tag_name + &quot;_auto_complete&quot;, :class =&gt; &quot;auto_complete&quot;) +
            auto_complete_field(tag_name, { :url =&gt; { :action =&gt; &quot;user_auto_complete&quot; } }.update(completion_options))
          end
        
        
          def auto_complete_text_two(object, method, tag_options = {}, completion_options = {})
            if(tag_options[:index])
              tag_name = &quot;#{object}_#{tag_options[:index]}_#{method}&quot;
            else
              tag_name = &quot;#{object}_#{method}&quot;
            end
            puts tag_name
            (completion_options[:skip_style] ? &quot;&quot; : auto_complete_stylesheet) +
            text_field(object, method, tag_options) +
            content_tag(&quot;div&quot;, &quot;&quot;, :id =&gt; tag_name + &quot;_auto_complete&quot;, :class =&gt; &quot;auto_complete&quot;) +
            auto_complete_field(tag_name, { :url =&gt; { :action =&gt; &quot;auto_complete_for_&quot; + tag_name } }.update(completion_options))
          end
        
          end
        
        
        # view file
        
        
        
        &lt;% 1.upto(3) do |legi|  %&gt;
        &lt;%=auto_complete_text_one( :user, :name, {:index =&gt; legi, :size =&gt; 20}) %&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;  
        &lt;% end %&gt;
        
        
        # Database design
        
        The database contains a table called 'Users' and the fieldname is 'name'.
      </description>
      <pubDate>Fri, 13 Jul 2007 00:34:25 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-43</link>
      <guid isPermaLink='false'>urn:uuid:7bcb1b2c-2e44-4b70-9593-c11fccf37db9</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Bala</title>
      <description>Can you find the probs on above code</description>
      <pubDate>Fri, 13 Jul 2007 00:34:47 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-44</link>
      <guid isPermaLink='false'>urn:uuid:6d6ebb31-d0f5-4845-a683-86bf72981d47</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by wolfmanjm</title>
      <description>The code in my article works fine, I use it. If you are having problems, then send me more information on what problems you are having, or send me your code. The email address is at the top of this page on the right.</description>
      <pubDate>Fri, 13 Jul 2007 09:03:59 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-45</link>
      <guid isPermaLink='false'>urn:uuid:b9b661a9-7a72-4146-8664-392461ea8ed9</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Curtis</title>
      <description>What does your partial look like?</description>
      <pubDate>Sun, 15 Jul 2007 21:08:57 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-46</link>
      <guid isPermaLink='false'>urn:uuid:832b53d5-9b84-442e-83e1-de59cba627a2</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Curtis</title>
      <description>
        Maybe this?
         
              `&lt;ul&gt;`
                &lt;% @names.each do|name|%&gt;
        	    &lt;li&gt;&lt;%= name %&gt;&lt;/li&gt;
                &lt;%end%&gt;
              `&lt;/ul&gt;`
      </description>
      <pubDate>Sun, 15 Jul 2007 21:11:40 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-47</link>
      <guid isPermaLink='false'>urn:uuid:16b73dd6-73c3-4f59-9028-772f5b54bdf5</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by wolfmanjm</title>
      <description>The partial I usually use is somewhat more complex as I like to include the ID. However there is a default used which looks much like what you show above, and for the purposes of this article should be sufficient.</description>
      <pubDate>Sun, 15 Jul 2007 22:23:55 -0700</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-48</link>
      <guid isPermaLink='false'>urn:uuid:7eff1003-e12e-4bff-96d9-0382e9f96052</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by julien</title>
      <description>Just wanted to say thanks for this! It solved my problem completely (I had the same issue with autogenerated fields) and it works like a charm. This should replace the standard text_field_with_autocomplete for future releases of RoR</description>
      <pubDate>Mon, 03 Dec 2007 18:11:30 -0800</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-49</link>
      <guid isPermaLink='false'>urn:uuid:f7446823-b469-41ca-b8f6-ba9c8c7cbfdd</guid>
    </item>
    <item>
      <title>"Having multiple text_field_with_auto_complete in the same view" by Jared</title>
      <description>
        Just thought you know this has been fixed:
        
        `http://dev.rubyonrails.org/attachment/ticket/5983/add_index_support_to_text_field_with_auto_complete.diff`
      </description>
      <pubDate>Fri, 07 Mar 2008 18:43:53 -0800</pubDate>
      <link>http://blog.wolfman.com/posts/12#comment-50</link>
      <guid isPermaLink='false'>urn:uuid:72d5d164-2aad-44e0-bd5b-700d232355ca</guid>
    </item>
  </channel>
</rss>
