# Problem with text\_field\_with\_auto\_complete Part 2

**URL:** <https://www.ruby-forum.com/t/problem-with-text-field-with-auto-complete-part-2/134347>\
**Category:** Ruby\
**Created:** [April 10, 2008, 12:04am UTC](https://www.ruby-forum.com/t/problem-with-text-field-with-auto-complete-part-2/134347 "2008-04-10T00:04:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 10, 2008, 12:04am UTC](https://www.ruby-forum.com/t/problem-with-text-field-with-auto-complete-part-2/134347/1 "2008-04-10T00:04:04Z")

</div>

Ok so I got the text field to populate a list of what I needed but I  
have a problem. When I select an item in Firefox, there’s 4 spaces that  
appear before it in the text field. In safari, nothing appears in the  
field after selecting. I saw reference to this problem while searching  
online but couldnt quite find a solution. My code is almost exactly  
whats in the scriptaculous example at  
[http://demo.script.aculo.us/ajax/autocompleter\_customized](http://demo.script.aculo.us/ajax/autocompleter_customized)

here it is:

#controller  
def auto\_complete\_for\_software\_title  
auto\_complete\_responder\_for\_software params[:software][:title]  
end

private  
def auto\_complete\_responder\_for\_software(value)  
@soft = Software.find(:all,  
:conditions =\> [ ‘LOWER(title) LIKE ?’,  
value.downcase + ‘%’ ],  
:order =\> ‘title ASC’,  
:limit =\> 40)  
render :partial =\> ‘software\_list’

#view  
\<%= text\_field\_with\_auto\_complete :software, :title, {}, :skip\_style =\>  
true %\>

#partial

\<% for soft in @soft do -%\> - \<%=h soft.title %\> 
\<% end -%\>

I tried alot of different things but nothing seems to be fixing it. Any  
help would be greatly appreciated. I’m almost there 🙂

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 10, 2008, 9:19am UTC](https://www.ruby-forum.com/t/problem-with-text-field-with-auto-complete-part-2/134347/2 "2008-04-10T09:19:02Z")

</div>

On Apr 10, 2008, at 24:04 , Mark Mr wrote:

> Ok so I got the text field to populate a list of what I needed but I  
> have a problem. When I select an item in Firefox, there’s 4 spaces  
> that  
> appear before it in the text field.

Hi Mark, could you please repost the question to rubyonrails-talk  
please?

– fxn

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 10, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/problem-with-text-field-with-auto-complete-part-2/134347/3 "2008-04-10T15:53:29Z")

</div>

Xavier N. wrote:

> On Apr 10, 2008, at 24:04 , Mark Mr wrote:
> 
> > Ok so I got the text field to populate a list of what I needed but I  
> > have a problem. When I select an item in Firefox, there’s 4 spaces  
> > that  
> > appear before it in the text field.
> 
> Hi Mark, could you please repost the question to rubyonrails-talk  
> please?
> 
> – fxn

oh hm i thought it was. Dunno how it got in here. sorry!
