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! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Craig White
2008-Mar-30 15:10 UTC
Re: ****[Rails] define size of text_field_with_auto_complete
On Sun, 2008-03-30 at 06:58 -0700, ncancelliere wrote:> 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!---- <%= text_field ''some_model'' ''some_field'', :size => ''64'' %> http://rails.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000923 Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ncancelliere
2008-Mar-31 02:25 UTC
Re: ****[Rails] define size of text_field_with_auto_complete
That doesn''t work with auto_complete though. I know how to do it for a text_field. :-) <%= 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. On Mar 30, 10:10 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> On Sun, 2008-03-30 at 06:58 -0700, ncancelliere wrote: > > 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! > > ---- > <%= text_field ''some_model'' ''some_field'', :size => ''64'' %> > > http://rails.rubyonrails.org/classes/ActionView/Helpers/FormHelper.ht... > > Craig--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Craig White
2008-Mar-31 02:35 UTC
Re: ****[Rails] Re: ****[Rails] define size of text_field_with_auto_complete
try this (I''m not gonna fire up rails at the moment) <%= text_field_with_auto_complete :agency, :city, {:size => 50} %> Craig On Sun, 2008-03-30 at 19:25 -0700, ncancelliere wrote:> That doesn''t work with auto_complete though. I know how to do it for > a text_field. :-) > > <%= 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. > > On Mar 30, 10:10 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote: > > On Sun, 2008-03-30 at 06:58 -0700, ncancelliere wrote: > > > 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! > > > > ---- > > <%= text_field ''some_model'' ''some_field'', :size => ''64'' %> > > > > http://rails.rubyonrails.org/classes/ActionView/Helpers/FormHelper.ht... > > > > Craig > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ncancelliere
2008-Apr-01 02:21 UTC
Re: ****[Rails] Re: ****[Rails] define size of text_field_with_auto_complete
That''s working thank you! On Mar 30, 9:35 pm, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> try this (I''m not gonna fire up rails at the moment) > > <%= text_field_with_auto_complete :agency, :city, {:size => 50} %> > > Craig > > On Sun, 2008-03-30 at 19:25 -0700, ncancelliere wrote: > > That doesn''t work with auto_complete though. I know how to do it for > > a text_field. :-) > > > <%= 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. > > > On Mar 30, 10:10 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote: > > > On Sun, 2008-03-30 at 06:58 -0700, ncancelliere wrote: > > > > 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! > > > > ---- > > > <%= text_field ''some_model'' ''some_field'', :size => ''64'' %> > > > >http://rails.rubyonrails.org/classes/ActionView/Helpers/FormHelper.ht... > > > > Craig--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---