Display user entry in text entry box as upper case always

I’m working on a software simulation where the text in the text entry box (i.e., form entry field) should automatically be displayed as upper case only regardless of how it is entered.

I’ve used the Debug view to verify that the following code is changing the user’s answer (variable is 07tebPayDate) to upper case. I need it to display as upper case in the form element. I don’t want to use a text block to create a fake text entry field if I can help it—this is because I need the user to be able to change the date if they enter it incorrectly.

This is the code:

var myString = Var07tebPayDate.getValue();

alert("myString = " + myString);

var upperString = myString.toUpperCase();

alert("upperString = " + upperString);

alert(Var07tebPayDate.getValue());

Var07tebPayDate.set(upperString);

I've also included a snip of the text entry box area.

THANKS!

Maura

simulationTEBs.pngsimulationTEBs-1.png

Discussion (2)

Hi Maura - I found this post worked well for me - hopefully it does the trick for you!

https://community.trivantis.com/forums/topic/all-letters-uppercase-except-last-one/

Thank you for helping me find that post AND many thanks to TIM K. for the original code!

Discussions have been disabled for this post