Format Currency
Posted: 13 Feb 2014
I am trying with no success to format a currency field on the new form. I would like it to either add the $ and commas during typing if possible. I have tried to use a popular jquery library called .formatCurrency(), but with no luck.
LInk to library: https://code.google.com/p/jquery-formatcurrency/
Error Message:
SCRIPT438: Object doesn't support property or method 'formatCurrency'"
Code Attempts:
//Format Currency Fields
$('.fd_field[fd_name="bidSecurityAmount"]').formatCurrency(); //using the library
//seperate attempt without the library
$('.fd_field[fd_name="bidSecurityAmount"]').text('$' + parseFloat(total, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString());
I referrenced the script library using a custom action with visual studio to deploy a script link
If you can help me in any way to try and apply currency formating to a field as the user types, that would be great. At the lease format the currency after they click off the field.
Thanks
LInk to library: https://code.google.com/p/jquery-formatcurrency/
Error Message:
SCRIPT438: Object doesn't support property or method 'formatCurrency'"
Code Attempts:
//Format Currency Fields
$('.fd_field[fd_name="bidSecurityAmount"]').formatCurrency(); //using the library
//seperate attempt without the library
$('.fd_field[fd_name="bidSecurityAmount"]').text('$' + parseFloat(total, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString());
I referrenced the script library using a custom action with visual studio to deploy a script link
If you can help me in any way to try and apply currency formating to a field as the user types, that would be great. At the lease format the currency after they click off the field.
Thanks