i am calculating the total of list and library form, the total is correct but it has lot of digits after decimal point .
This problem is only there in the display form, when you edit the page it give the correct decimal point decimal points .
Please see the code below
function calcTotal() {
var value = fd.control('SPDataTable1').widget.dataItems();
var total = 0;
if(value){
for (var i = 0; i < value.length; i++){
if(value[i].Amount)
total += parseFloat(value[i].Amount.replace(/(?!^-)[^0-9.]/g, "").replace(/(\..*)\./g, '$1'));
}
}
fd.field('Total').value = total;
fd.field('Total').visible = false;
fd.field('Number1').value = total;
fd.field('Text1').value = total;
}
how do i disabe the field from the tool bar such as number field dragged into the form
fd.field('Number1').disabled = = true;
is not working