0

I'm trying to write html to accept credit card information without showing what the user types on the screen.

I want it replaced with black dots or asterisks. I also want it to auto-complete from my browser's stored credit card info. This seems so simple that I haven't been able to find it. Help?

What I have so far:

<form>
<input name="cc-number" type="cc-number" autocomplete="cc-number"></input>
</form>

This pulls the credit card information, as expected. But I don't know how to mask what the user sees with dots/asterisks.

How do I mask input to be dots or asterisks without EVER showing a number on the screen in my input field?

  • Maybe you can use [password input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password): `` – G.M May 24 '23 at 10:23
  • Negative. It then no longer auto-completes for a credit card. It attempts to auto-complete for a password. But at least it has black dots. Thanks for the suggestion. – user11784354 May 25 '23 at 03:35

0 Answers0