• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Force Upper or Lower case in Acrobat DC Pro?

New Here ,
Feb 01, 2016 Feb 01, 2016

Copy link to clipboard

Copied

Hi!

Is it possible to run a script that will force all letters in specific fields to appear as upper or lower case as soon as one hits tab or clicks the mouse on another field?  This field would also need to remain capitalized through saving & printing.


Thanks!


Dawn

TOPICS
Acrobat SDK and JavaScript , Windows

Views

12.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 01, 2016 Feb 01, 2016

You can use a custom validate script for a text field:

// Custom validate script

// Convert entry to upper-case

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

You can also use a custom keystroke script to convert characters as they are typed by the user, something like:

// Custom keystroke script

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

To convert to lower-case, use the toLowerCase method.

Votes

Translate

Translate
LEGEND ,
Feb 01, 2016 Feb 01, 2016

Copy link to clipboard

Copied

You can use a custom validate script for a text field:

// Custom validate script

// Convert entry to upper-case

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

You can also use a custom keystroke script to convert characters as they are typed by the user, something like:

// Custom keystroke script

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

To convert to lower-case, use the toLowerCase method.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 02, 2016 Feb 02, 2016

Copy link to clipboard

Copied

Thank you!  It works great!

Please excuse the dumb question, but where would I insert the custom keystroke script?  Also in the validation area?

Dawn

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2016 Feb 02, 2016

Copy link to clipboard

Copied

It is a bit hidden away. First select the Format tab and then select a Format Category of Custom, and you'll see where to enter the script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 01, 2022 May 01, 2022

Copy link to clipboard

Copied

LATEST

In Microsoft Word there is an option to covert to "proper" case, where only the first letter of the word is upper case. Is there an equivalent in javascript?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines