Calculate time on form

  • Muhammad Gulzar
    Asked on August 17, 2022 at 12:21 PM

    Hi there? I want to calculate time in time card form. I want to total hours on start-time end-time and minus break hours . please suggest how can do it using jotform widgets.
    here is form layout link
    I want result in total hour column in same table.

  • Harvey JotForm Support
    Replied on August 17, 2022 at 2:10 PM

    Hi Muhammad,

    Thanks for reaching out to Jotform Support. I've checked the form in your account. It is not possible to calculate the total hour's work using the Input Table field on your form as it cannot have a time field on it. But what you can do is to have the time fields separated for each day along with the break hours. Check the sample screencast below:

    1660759267 62fd2ce3e7281  Screenshot 10

    Here is how the above screencast was achieved:

    • In your Form Builder add a Time Field to get the work hours.
    • Open the Time Field properties and click on the Range tab to enable Time range and Duration. 1660759416 62fd2d782f6d1  Screenshot 21
    • Add a Number field to collect the number of Break hours your employee took.1660759463 62fd2da700b25  Screenshot 32
    • In Form Elements, under the Widgets tab add a Form Calculation widget to calculate the total hour's work.
    • Click on the Wand icon to open its calculation window.1660759552 62fd2e00c9ff5  Screenshot 43
    • Click on the Add field button and select the Time field then click on the minus button and add the Break hours field this time.
    • Click on Save once done. 1660759691 62fd2e8b25cd5  Screenshot 54

    That's it. Now you would be able to calculate the total working hours of your employees using the steps above. Here is a demo form as well where the above steps are applied. If you want to clone the form to your account you can follow this guide on how to do so.

    Give it a try and let us know if you have any questions.