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

format field with upper case character

Participant ,
Feb 01, 2018 Feb 01, 2018

I have a text field that I need users to enter a specific number format in. The field format must look like A99999. The first character must be upper case character. I will appreciate for detail explanation how to do it in Acrobar DC?

TOPICS
Acrobat SDK and JavaScript
604
Translate
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
Community Expert ,
Feb 01, 2018 Feb 01, 2018

You will need to write a custom Format keystroke or validation script.

Translate
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
Participant ,
Feb 01, 2018 Feb 01, 2018

Hi try67. Thanks for replay.

I have code in validation script:

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

It works. But when I specified format entered data like: A99999 I lost upper case. How to have forth upper case first character and format enterd data?

Thanks.

Translate
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
Community Expert ,
Feb 02, 2018 Feb 02, 2018
LATEST

The question is do you want to prevent the user from entering text that doesn't follow this pattern, or do you want to let them enter anything, but reject it if it's incorrect. For the former you would need a Keystroke script. For the latter a Validation script will do.

Translate
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