rbf_formatCurrency() does not format a number if it's 0

Posted by Rollbase User on 18-Dec-2009 08:34

rbf_formatCurrency() doesn't format a number if it's zero. Instead of populating the field with $0.00 which is desired, it leaves the field blank. Any suggestions? var totalFee = 0; document.theForm.totalfee.value = rbf_formatCurrency(totalFee);

All Replies

Posted by Admin on 18-Dec-2009 11:15

I will add a parameter to manage this: show "0" or empty string.

Posted by Admin on 29-Dec-2009 09:37

This has been addressed in production

Posted by Admin on 29-Dec-2009 10:23

Try this:
rbf_formatCurrency(totalFee, "$", true);

The third parameter manages how to process 0 or NaN value.

This thread is closed