Password_field helper

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?

Shandy N. 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

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

Mike G. 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.

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