Forum Discussion
SuzanneNeafus
2 months agoCommunity Member
Can you restrict or convert the text in a data entry input field?
Is there a way to have the entry automatically be a capital letter and or convert it after it has been entered? What I am trying to accomplish is to have 3 sentences on the screen, and for each, th...
JesseWu
Community Member
var player = GetPlayer();
// Convert variables optionA, optionB, and optionC to lowercase
["optionA", "optionB", "optionC"].forEach(function(variable) {
player.SetVar(variable, player.GetVar(variable).toLowerCase());
//if you want to convert to uppercase, replace with player.SetVar(variable, player.GetVar(variable).toUpperCase());
});
SuzanneNeafus
2 months agoCommunity Member
Thank you so much. It is much easier for me to add this and only have to process capital letter inputs. Take care - Suzanne