adobe form Calculations and totals
Hi all,
I need some help please, i have the below form that i want to setup to enable my remote team to fill in the form.
1 .Is there anyway that i can set it up that if they select time the drop down in point 3, it will then auto fill in the corrosponding colums?
2. is there anyway that i can then have the totals at the bottom for each column?

each Text field is formated to numbers.
Script for above Total hours
// Get the start and end times from the form fields
var startTime = this.getField("StartTime").value;
var endTime = this.getField("EndTime").value;
// Function to convert time string to decimal hours
function timeStringToDecimal(timeString) {
if (!timeString) return 0; // Handle empty fields
var parts = timeString.split(":");
var hours = parseInt(parts[0], 10);
var minutes = parseInt(parts[1], 10);
return hours + (minutes / 60);
}
// Calculate the time difference in decimal hours
var startDecimal = timeStringToDecimal(startTime);
var endDecimal = timeStringToDecimal(endTime);
var decimalDifference = endDecimal - startDecimal;
// Ensure the result is positive
decimalDifference = Math.abs(decimalDifference);
// Format the output
event.value = decimalDifference.toFixed(2); // Display with 2 decimal places
