Remove zero balances in calculated fields and keep two decimal points.
I have a fillable form with auto calculations for costs. The blank calculation fields show up as 0.00 in the field. I need the blanks to be empty showing no zeros. When they do enter a number to calculate, I need the results to show 2 decimals, such as $ 19.50. I prefer to do this using a custom format field. Right now I have the follwing in my custom format scrip:
if((event.value == 0) || isNaN(event.value) || (event.value == Infinity))
event.value = "";
This shows 19.50 as 19.5 and shows 55.00 as 55. How can I get this to display correctly?