michael.campbell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-03  22:36 UTC
text_field "maxsize" not working?
Is this something I''m doing wrong, or is there a bug (or something
else)?  The agile book and the ROR API seems to indicate this should
work.
rhtml:
    <td><%= text_field(''state'',
''abbreviation'', :size => 2, :maxsize =>
2) %></td>
Rendered HTML:
    <td><input id="state_abbreviation" maxsize="2"
name="state[abbreviation]" size="2" type="text"
/></td>
I''ve tried:
:size => 2, :maxsize => 2
{:size => 2, :maxsize => 2}
"size" => 2, "maxsize" => 2
{"size" => 2, "maxsize" => 2}
They all render the same HTML.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Hey, Change your :maxsize to :maxlength and it should work properly. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
michael.campbell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-04  01:05 UTC
Re: text_field "maxsize" not working?
osh wrote:> Hey, > > Change your :maxsize to :maxlength and it should work properly.Perfect, thanks. Where did you find that? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Didn''t really find it anywhere. Just from knowing that a regular HTML rendered input uses the maxlength property and not maxsize.Good luck to you... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---