Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 910
  • Last Modified:

Javascript to format text to all caps in Acrobat 5.0 Form

I would like to write a Javascript function in the "format" section of a text box on an Acrobat form.  I have tried a number of things, however it will not work because of definitions.  I do not know how it needs to see things, however all I want is a format script to run so that whatever a user types into a the text box on the Acrobat form is auto formatted to ALL caps.

HELP!!

TIA

/.nick
0
Anjinsan5
Asked:
Anjinsan5
  • 4
  • 2
1 Solution
 
Karl Heinz KremerCommented:
Open up the properties dialog for your text box. Select the "Format" tab and select "Custom" for the category. In the "Custom Format Script" field enter the following JavaScript:


event.value = event.value.toUpperCase();

This will (at the time the new text field value is commited) convert the string to all caps. The string that is actually stored in the text field is still as it was entered, it's just the export value that gets modified. And, while you are entering the data, you will not see the upper case characters.

Is this what you want?
0
 
Anjinsan5Author Commented:
I would like to be able to SEE the character as upper case...is there a way to do this?

/.nick
0
 
Karl Heinz KremerCommented:
Do you want to see them as you type? The caps string is displayed one you leave the field (with either RETURN, or TAB).
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Karl Heinz KremerCommented:
If you want every keystroke to be converted to caps right away, use this script in the "Custom Keystroke Script" field:

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

0
 
Karl Heinz KremerCommented:
Is this now working as you expect it to work?
0
 
Anjinsan5Author Commented:
Works now!  Sorry for the delay!

/.nick
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now