Force Uppercase in Form fields

Avatar

11-05-2007

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.

Replies

Avatar

Avatar

gkaiseril

Avatar

gkaiseril

gkaiseril

15-05-2007

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.