bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-28 20:49 UTC
Reducing the length of stupid Textfield
Is it possible to reduce the length of the text field in a form? I used :size => 5, it does not reduce the size of text field shown on the screen. It is very long. TIA. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
juliamae-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-28 21:00 UTC
Re: Reducing the length of stupid Textfield
:size => 5 in the options hash should work: text_field_tag "name", value = "", options = {:size => 5} That yields a text field with size 5 for me. So does: f.text_field :first_name, {:size => 5} Make sure there''s no CSS forcing the field to be longer. Hope that helps.. On Feb 28, 3:49 pm, "bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is it possible to reduce the length of the text field in a form? I > used :size => 5, it does not reduce the size of text field shown on > the screen. It is very long. TIA.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Is it possible to reduce the length of the text field in a form? I > used :size => 5, it does not reduce the size of text field shown on > the screen. It is very long. TIA.Use CSS Formatting to reduce the size of the textfield. -- 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 -~----------~----~----~----~------~----~------~--~---
> Is it possible to reduce the length of the text field in a form? I > used :size => 5, it does not reduce the size of text field shown on > the screen. It is very long. TIA.Odds are it''s being styled via CSS. Try adding: :style => "width: 100px" And see if that shortens it... if so, CSS is styling it and you''ll have to decide where to modify it. -philip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > Is it possible to reduce the length of the text field in a form? > I used :size => 5You need to put the size in quotes: :size => "5" hth, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m not sure that''s true, Bill. I''ve been using :size => 20 [any number will do] on my fields for months [if not longer] and they work just fine. It even autoconverts them to the quoted string values that are proper XHTML. I''m using Edge Rails if that makes a difference. RSL On 2/28/07, Bill Walton <bill.walton-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> > > > > > Is it possible to reduce the length of the text field in a form? > > I used :size => 5 > > You need to put the size in quotes: > :size => "5" > > hth, > Bill > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-01 20:25 UTC
Re: Reducing the length of stupid Textfield
It does not matter whether it is within double quotes. Thanks for the help, the CSS was forcing the length to be constant. Checkout the CSS Viewer plugin for Firefox, it is awesome. You just point at the field and it shows a floating window shows you which css elements define it. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---