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

Get Text Field Format

New Here ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

Hi,

I require some help regarding JS in Acrobat DC.

I've been looking in every document and every corner of the internet and I just can't seem to find what I need.
What I require is to programically get the format currently applied to a text field, (for example, none, number, percentage, etc.).
To be clear, I do not need to know what type of data would currently be in the field's .value, as it can have nothing at all at that moment.
What I need to know is what that field is currently formatted for (Properties > Format).

Also, yes, I know you can just apply the right format to that field programmically like

AFNumber_Format(2, 0, 0, 0, "", true);

That is also not what I want. I want to apply further code on the field only if it is configured for a wrong date or number format. And for that I need to know what format it has beforehand.


I'm trying to develop scripts to automatically detect wrong formats being applied to certain fields in large files, please help me out if you have any clue.

TOPICS
Acrobat SDK and JavaScript

Views

316

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

New Here , Aug 14, 2020 Aug 14, 2020

Votes

Translate

Translate
New Here ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

LATEST

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