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

296

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
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , 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 += "%";

Likes

Translate

Translate
Adobe Community Professional ,
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 += "%";

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
community guidelines