Expand my Community achievements bar.

How to convert lowercase to uppercase characters?

Avatar

Level 1

Hi!

I am a newbie to LiveCycle; I have created a form but I want all characters in the field to automatically be converted to uppercase, regardless of the input.

Thanks

Jofar1

5 Replies

Avatar

Former Community Member

Just add this command to the exit event of your field:

this.rawValue =

this.rawValue.toUpperCase();

When you exit the field, the script will be fired and your text wil change to uppercase

Paul

Avatar

Level 1

Thanks Paul.

How do I get the "exit event" option?

Avatar

Former Community Member

Under the Window menu, ensure that the scripting editor is enabled. By default it will appear between the toolbars and the drawing palette. It can be resized if need be. Now highligh the object you want to script against. Now in the scripting editor choose the event you want to program against in the Show drop down at the top left of the scripting editor (choose Exit). Now on the same line move to the far right and choose Javascript under the Language dropdown. Now write your code in the 1st blank line. Save and test

Paul

Avatar

Level 1

Thanks a lot Paul. It works.

Avatar

Level 5

The best method is to change the text to uppercase as it's being typed in:

Add this to the "change" event:

xfa.event.change = xfa.event.change.toUpperCase();