Skip to main content
Known Participant
November 6, 2020
Answered

Convert Input to All Caps

  • November 6, 2020
  • 2 replies
  • 1885 views

I have a user input text box.  I have set an arbitrary mask format to AAA9999-99999.  Is there a way to set the AAA part to be all capital letters when the user inputs their text?

This topic has been closed for replies.
Correct answer ls_rbls

I think you can use something like a custom keystroke script like this:

 

event.change = event.change.toUpperCase();
event.value = util.printx("AAA9999-99999", event.target.value);

 

It may be a more elegant way to accomplish this via scripting.

2 replies

ls_rbls
Community Expert
ls_rblsCommunity ExpertCorrect answer
Community Expert
November 6, 2020

I think you can use something like a custom keystroke script like this:

 

event.change = event.change.toUpperCase();
event.value = util.printx("AAA9999-99999", event.target.value);

 

It may be a more elegant way to accomplish this via scripting.

try67
Community Expert
Community Expert
November 6, 2020

Not while they're typing (unless you create your own custom Keystroke script), but you can do it when they exit the field, using this code as the custom Validation script:

event.value = event.value.toUpperCase();