These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat Fillable Form Text Field : to accept text in Capital Letters.

pramod_kmr73
Registered: Mar 11 2008
Posts: 25
Answered

I have designed a Fillable PDF Form usnig Acrobat Pro 8.

I now want to ensure whereever input text field is provided the input should come in capital letters only.Even when the user types in small letters the same should be changed to capital letters.

I need the help on such setting if available or java script to be used for this.

regards

pramod
mumbai

My Product Information:
Acrobat 3D 8.1.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
One uses the "Custom" option on the "Format" tab and then can use the following scripts:

// Custom Keystroke script on the Format tab
event.change = event.change.toUpperCase();

// Custom Format script on the Format tab
event.value = event.value.toUpperCase();

George Kaiser

WoOkZZ
Registered: May 27 2011
Posts: 28
George,
Does this work in Acrobat 9 as well?


Thanks

WoOkZZ

maxwyss
Registered: Jul 25 2006
Posts: 255
If I remember correctly, that worked since Acrobat 3.02…

Max Wyss.

AJMitchell
Registered: Dec 7 2011
Posts: 6
Hi gkaiseril,

The script you posted works perfectly for me too on my form's Surname field. Thanks.

I've also a concatenated field on each page with the following script:

event.value = getField("Surname").value + ", " + getField("FirstNames").value + " - CHI: " + getField("CHIUnitNo").value;

is there any way the upper case formatting (which works great on the original Surname field) can be applied to the concatenated field too?


gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
The ".toUpperCase()" method works with any string value. You could apply it to each field or the entire string.

Each field:

event.value = (getField("Surname").value.toUpperCase() + ", " + getField("FirstNames").value.toUpperCase() + " - CHI: " + getField("CHIUnitNo").value).toUpperCase();


The whole string:

event.value = (getField("Surname").value + ", " + getField("FirstNames").value + " - CHI: " + getField("CHIUnitNo").value).toUpperCase();

George Kaiser

AJMitchell
Registered: Dec 7 2011
Posts: 6
Hi George,

Perfect! I just needed the surname in upper case so it's clear for clinical staff - it's working great.

Thanks again for your help.

Andrew