Display user entry in text entry box as upper case always

msullivan3430
msullivan3430 Community Member Posts: 42
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

Comments

Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!