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

How to Properly use the Percentage In PDF Form

Community Beginner ,
Jun 13, 2022 Jun 13, 2022

Formatting a text box to percentage is multiplying the value by 100.How to avoid that so that when I enter 5 it will be 5% not 500% in PDF Forms.

 

Format Changed to Percentage

SibiMG_0-1655160847047.png

 

Entering 5 is now 500%.

SibiMG_1-1655160907333.png

 

Can someone help me to solve this issue..

Thanks

TOPICS
Acrobat SDK and JavaScript
740
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

correct answers 1 Correct answer

Community Expert , Jun 14, 2022 Jun 14, 2022

As validation script use this:

if(event.value)
event.value = event.value/100;

Translate
Community Expert ,
Jun 14, 2022 Jun 14, 2022

As validation script use this:

if(event.value)
event.value = event.value/100;

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 Beginner ,
Jun 14, 2022 Jun 14, 2022

Hi @Nesa Nurani  ..I am just wondering what is if(event.value) doing in this code?

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 ,
Jun 14, 2022 Jun 14, 2022
LATEST

That means if field has value, it will trigger script, you can remove that part if you wish.

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