Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

text-transform: uppercase

I want several text fields on my form to default to uppercase, even if the user is in lowercase or types initial caps, or whatever. I've tried using the text-transform style shown in the Subject but can't seem to make it work. Advice? Thanks...
5 Replies
In Designer 7.1, I have used this Javascript on the Exit event of the textfield:



this.rawValue = this.rawValue.toUpperCase();



This will change your text to UpperCase or All Caps.



hd

Avatar

Level 2
Does anyone know how to change the format of a text string to Title Case?

On my form the text comes in (binding) as all Upper Case and I need it to appear in Title Case.

I have successfully used

this.rawValue = this.rawValue.toUpperCase(); and

this.rawValue = this.rawValue.toLowerCase();

to convert text to Upper or Lower Case but I have been unsuccessful at converting to Title Case. Does anyone know how to do this?

Avatar

Level 7
You will have to use JavaScript to split the text into words, use the "split(separator)" method to create an array of elements, each element being one word. Convert each element's string value to lower case. You can then use the "substring(indexA, indexB)" to get the first letter of each element string and convert it to upper case and concatenate it to the substring of the element less the first letter.

Avatar

Level 2
Thank you for the information---that's way over my head though. Does anyone have a function that could be shared that is known to work in LiveCycle Designer?