Copy link to clipboard
Copied
Hello.
I am trying to create a form with the automatic calculation. I have set the format as Number and 2 decimal places. But if I input the value as 13.004, although it will display it as 13.00, the true value would remain as 13.004. Then when I try to total the value, it would go off as it is not using the rounded off value(2 decimal place). It would use the input value rather then the displayed value.
How do I make it round off to two decimal places and use that rounded off value?
Copy link to clipboard
Copied
That's because the Format option doesn't change the field's actual value, only the way it is displayed.
To do that you have to you a script. For example, as the field's custom Validation script enter the following code:
if (event.value) event.value = event.value.toFixed(2);
Copy link to clipboard
Copied
Hello, thank you for your quick response.
I am still unable to convert the following numbers to 2 decimals place. As you can see in the photo, for the 1.00, I input the value as 1.003. For the 0.00, I input the value as 0.003. Hence that will mess up the total. How do I solve this issue? I am not using any custom script at the moment. I am using the Format and Calculate properties.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more