I am using a password_field help to collect credit card information. Is there a way to make it so the field collects no more then 16 digits? In normal html this would be achieved through "nowrap." Is there an equivalent in the rails world? -- 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 -~----------~----~----~----~------~----~------~--~---
Shandy Nantz wrote:> I am using a password_field help to collect credit card information. Is > there a way to make it so the field collects no more then 16 digits? In > normal html this would be achieved through "nowrap." Is there an > equivalent in the rails world?I should give the code that I have so far, so here it is: <%= password_field ''creditcard'', ''card_num'', :id => ''card_num'', :cols=>16 %> Thanks, ~S -- 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 -~----------~----~----~----~------~----~------~--~---
you''re using a password field for a credit card number? Won''t that make it difficult for the user to see what they''re typing? Mike On 7/12/07, Shandy Nantz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Shandy Nantz wrote: > > I am using a password_field help to collect credit card information. Is > > there a way to make it so the field collects no more then 16 digits? In > > normal html this would be achieved through "nowrap." Is there an > > equivalent in the rails world? > > I should give the code that I have so far, so here it is: > > <%= password_field ''creditcard'', ''card_num'', :id => ''card_num'', > :cols=>16 %> > > Thanks, > > ~S > > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Mike Garey wrote:> you''re using a password field for a credit card number? Won''t that > make it difficult for the user to see what they''re typing? > > MikeThat''s kind of the idea.........It''s like when you type in your password into your yahoo! account is shows astericks so someone that is looking over your shoulder can''t see your password. It''s the same idea here. -- 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 -~----------~----~----~----~------~----~------~--~---
I don''t think that''s such a great idea.. First off, I don''t know about you, but I don''t have my credit card memorized, which means when I''m buying something, I''ve gotta take out my credit card and read off the digits while I type them into the entry box. If anyone wanted to see my credit card number, all they''d have to do is look at my credit card as it''s lying on my desk - the fact that you use a password_field to hide the information will be of little use, and will most likely just annoy your users. It means they''ve gotta type their credit card number in _exactly_ without making a mistake, and can''t re-read it to make sure they''ve entered it correctly. Ever notice how password fields usually have a confirmation box? Since you can''t see what you''re typing, it makes it easy to make a mistake. By making the user type in their password twice, it helps eliminate any typos. But of course you wouldn''t want to do the same thing with a credit card entry box. Typing in your credit card number once is bad enough, if I had to do it twice, I''d just as soon go to another website. Mike On 7/12/07, Shandy Nantz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Mike Garey wrote: > > you''re using a password field for a credit card number? Won''t that > > make it difficult for the user to see what they''re typing? > > > > Mike > > That''s kind of the idea.........It''s like when you type in your password > into your yahoo! account is shows astericks so someone that is looking > over your shoulder can''t see your password. It''s the same idea here. > > -- > 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 -~----------~----~----~----~------~----~------~--~---