define size of text_field_with_auto_complete

I am using the auto_complete plugin to help out in some of my forms in Rails 2.0. The issue I'm having is trying to get the text field size to be more than 30 in width in the display.

It seems to be taking the default attribute of a form_for.text_field object, and I don't know how to override it. The only options you can pass to it are the model and field and optional limit to the amount of items returned.

If anyone has some advice I'd greatly appreciate it, thanks!

I am using the auto_complete plugin to help out in some of my forms in Rails 2.0. The issue I'm having is trying to get the text field size to be more than 30 in width in the display.

It seems to be taking the default attribute of a form_for.text_field object, and I don't know how to override it. The only options you can pass to it are the model and field and optional limit to the amount of items returned.

If anyone has some advice I'd greatly appreciate it, thanks!

That doesn't work with auto_complete though. I know how to do it for a text_field. :slight_smile:

    <%= text_field_with_auto_complete :agency, :city, :size => 50 %>

--still renders the input field as 30 characters long. It seems to be using the default (30) settings from the text_filed formhelper, but specifying them doesn't seem to override them.

My post was saying how I can't get it to do anything for the autocomplete fields.

try this (I'm not gonna fire up rails at the moment)

<%= text_field_with_auto_complete :agency, :city, {:size => 50} %>

Craig

That's working thank you!