Forum Discussion
LonTcopp
2 years agoCommunity Member
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 sit...
Jean-Guy-Boulay
8 months agoCommunity 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);
- CorporateTra8304 months agoCommunity Member
I tried this is not working.
- Nedim4 months agoCommunity Member
Try this when the timeline starts:
var input = document.querySelector('.acc-textinput'); input.addEventListener("keydown", function () { let length = input.value.length; input.value = "*".repeat(length); });
- Jean-Guy-Boulay3 months agoCommunity Member
Really? I just tried the script again and it works fine. Did you set the javascript to execute when the textEntry variable changes? Did you make sure to adjust the "textEntry" to the name of the variable assigned to your text field? eg. In this image I have a textEntry text field with a variable called "badgeNum".
Sorry for not replying earlier, for some reason I never got notified of this question.