Forum Discussion
Converting input text to a password icon/asterisk as you type?
Hello: can this be done?: Id like a user to type a password into a box. As they type, the letter are instantly concerted to small circles or asterisks as happe d when you enter a password in a site online. I thought about trying to use a mask to uncover the circles/asterisks but haven't had any luck. Any ideas? Thanks!
- WaltHamiltonSuper Hero
It seems to me that your idea of using a mask has worked before. Perhaps an easier method, if you can get it to work, is to format the box to a different font. There are fonts out there that are all asterisks, or maybe a symbols font would work.
- ToddBearsonCommunity Member
Found a font called Password Text." Works great -thanks!
- WaltHamiltonSuper HeroYou're welcome. PIAWYC (Pass it along when you can).
- Jean-Guy-BoulayCommunity Member
Execute a javascript when the textEntry changes:
var player = GetPlayer();
const password = player.GetVar("textEntry");
const maskedString = "*".repeat(password.length);
player.SetVar("textEntry", maskedString);