Comma is treated as decimal
I am working on a document where the user enters an average service package value into a field. Currently, the field has some placeholder text to give additional context, set with a custom format script.
if (!event.value) {
event.value = "How much is your average client paying to work with you?";
event.target.display = display.noPrint;
} else {
event.target.display = display.visible;
event.value = util.printf("$%,02.0f",event.value);
}If I enter a value without a comma separating the thousands place from the hundreds place, everything works as expected. If I enter the value using a comma, it is treated as a decimal point.
I'm flummoxed as to how to specify the number format for the input while still having custom calculation code to display the placeholder text.
Any help would be so greatly appreciated!
