change negative numbers to parentheses in an acrobat form
Hi,
I'm having one text field (Text1) and one number field (NumberField) in an acrobat form and I need to pull the data from number field to the text field.
Sometimes the NumberField value is in negative numbers. So, I need to change the negative numbers to parentheses ().
var num = this.getField("NumberField").value;
var str = num.toString();
var strlen = str.lenght;
var value1 = util.printf("%, 0 0.2f", num);
if (num == "") {
event.value = "This part contains: "
} else {
even.value = "This part contains: + value1;
}
Above is the script to get the value from number field and formatting decimal as well.
Please help me to change the negative number to parentheses.
