Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Uppercase letters

Avatar

Former Community Member
How I can force the usuer to type in letters uppercase the data of my form?



Or at least that the data generated for xml are in uppercase.
4 Replies

Avatar

Former Community Member
Here's a way to convert the string to uppercase:



Set the field rawValue to a variable, then perform .toUpperCase() and set to new variable.



For example,



var myVar = TextField1.rawValue;

var myNextVar = myVar.toUpperCase();

//Then, if you want to change the rawValue to reflect the upper case

TextField1.rawValue = myNextVar;



You can put this in the exit event, or do it as part of a submit, or what have you.



Lynne

Avatar

Former Community Member
You lost me at "rawValue".



Where do I put this script, in the XML source I assume?

Avatar

Former Community Member
Hi Tim,



You write this script in the Script Editor.



1. Open the Script Editor if not done already (Window > Script Editor).

2. Select the field you want to apply the script to.

3. In the Script Editor, select 'exit' from the Show drop-down list.

4. Write your script.

5. Preview the form.

6. Type some data into the field. Tab out.



The field's value will be displayed in uppercase after you exit the field.



Hélène

Adobe Systems Inc.