Skip to main content
Participant
April 15, 2022
Question

Percentage field & calculation

  • April 15, 2022
  • 2 replies
  • 602 views

Currently I created a PDF where consumers need to add in a decimal value instead of a percentage value for a calculation. I want consumers to be able to just add in a whole number "70" and be immediately transalated into "70%", but when I do that it converts into "7000%". Right now they have to add it as a decimal value in order to make the calculation work properly. Is there a simple script I can add to fix this problem?

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
April 16, 2022

This pretty much defeats the purpose of a Percentage field... Just use a regular field and add the percentage symbol with a custom Format script, then.

Nesa Nurani
Community Expert
Community Expert
April 15, 2022

As validation script of percentage field use this:

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