Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Force Uppercase in Form fields

Avatar

Former Community Member
I tried the script suggested by LHigbee on 27 X 06 which reads like this:



var myVar = TextField1.rawValue;

var myNextVar = myVar.toUpperCase();

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

TextField1.rawValue = myNextVar;



(
LHigbee, "Uppercase letters" #1, 27 Oct 2006 9:59 am)



The string worked in one form but didn't work in another. I did change the TexField1 parameter to match the actual field name. I tried using the script on exit and on enter but it didn't work in the second form. I'd prefer to have it go on enter. I learned a long time ago one must design to the lowest common denominator as today too many users don't know where the 'any' key is.



Any help would be much appreciated.
1 Reply

Avatar

Level 7
Live Cycle Designer has two languages available, JavaScript and FormCalc. Your example is JavaScript. The same result can be achieved with FormCalc by using either "this.rawValue = upper(FieldName)" or "FieldName = upper(FieldName)" in the "exit" event script.