multiplication problem with comma and point
First of all, I'm pretty new with scripting in PDF Forms.
my case:
I'm trying to create a form with mutliple textfields. The last textfields should multiplicat all other fields togeather so I get a sum in the end.
Thats really easy to do. Every field gets the format of a number with "1.234,56" because the German culture is uses "." as a group separator and "," as the decimal separator.
The script to get the sum in textfield3 is as easy as it can get:
var v1 = this.getField("Text1").value;
var v2 = this.getField("Text2").value;
event.value = v1 + v2;
In Adobe DC pro and Adobe DC reader everything works fine but when I open the form in google chrome directly I get the issue that the calculation goes wrong.
Google Chrome is using the format "1,234.56" instead of "1.234,56". That causes the value to change from, for excample 12,12 to 12012.
Is there any methode to force the PDF in google chrome to use the German culture instead of the English culture?
I can't change any settings in Google Chrome, so the issue must be solved with the PDF itself.
I tried using this validation:
event.value = event.value.replace(/\,/g, ".");
But that caused the sum to be 12,121212 in the end instead of the 24,24 I wanted.
