format field with upper case character

Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

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

Views

142

Likes

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

format field with upper case character

Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

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

Views

143

Likes

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
Feb 01, 2018 0
Most Valuable Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Feb 01, 2018 0
Participant ,
Feb 01, 2018

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Feb 01, 2018 0
try67 LATEST
Most Valuable Participant ,
Feb 02, 2018

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Feb 02, 2018 1