pritam
Filament
function calculateTotal(){
let total = 0;
let inputFields = document.querySelectorAll('.filament-table-repeater-tbody-cell .fi-fo-field-wrp .fi-input');
inputFields.forEach(element => {
if(element.value != ""){ total += parseFloat(element.value); } }) const totalContributionField = document.querySelector('input[id="data.total_amount"]'); totalContributionField.value = total; }
if(element.value != ""){ total += parseFloat(element.value); } }) const totalContributionField = document.querySelector('input[id="data.total_amount"]'); totalContributionField.value = total; }
42 replies