In order to more easily manage forms and restrict currency fields to two decimals, I have been using the following code:
$(document).ready(function() { $('.currency').change(function() { $(this).val(formatCurrency($(this).val())); }); function formatCurrency(value) { var float = parseFloat(value); return isNaN(float) ? 0 : (Math.round(float*100)/100).toFixed(2); } });
I found it in this thread: https://answers.laserfiche.com/questions/89089/Round-to-2-decimal-points-with-Forms-10.
This code only restricts the currency fields on the first row of a table to two decimals. All subsequent rows with a currency values are not restricted to two decimals. Any suggestions on how to fix this?