I have the below
$('.amount2').on("input", function() {
var total = 0;
var i = 0;
$('#manifest-table25 .amount2').each(function() {
total += $('#id_form-'+(i)+'-Amount').val();
i++;
})
$('#id_InvoiceTotal').val(total);
});
What is confusing me is that when I enter the value 5 into the input I would expect for the total to equal 5, instead it shows on the UI as 05. How do I remove the leading zero/any thoughts on what is causing it? It is an integerfield in the model not charfield.
<>button in editor to make a snippet. You will increase a chance for fast help by a lot...