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

I need to change the decimal placement in the percentage field.

New Here ,
Apr 22, 2019 Apr 22, 2019

Copy link to clipboard

Copied

I have a percentage field where the decimal place needs to be moved. When you type in 20 the decimal place value shows 2000% (i.e. 20x100%). You have to type in .20 to get the field to show 20%. That doesn't flow well with this form, where the rest of the percentages are represented as numbers with 2 decimal places (20.00).

Does anyone have the code to fix this?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

705

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

Community Expert , Apr 23, 2019 Apr 23, 2019

Then don't use a Percentage field, because that's how it works.

Use a regular text field with the following code as the custom Format script:

if (event.value) event.value += "%";

Votes

Translate

Translate
Community Expert ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

LATEST

Then don't use a Percentage field, because that's how it works.

Use a regular text field with the following code as the custom Format script:

if (event.value) event.value += "%";

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