Can I get form calculation widget to display the text of the fields calculated and numbers

  • YouthUnlimitedGTA
    Asked on August 6, 2020 at 3:36 PM

    I've figured out how to get the form calculation to add up the fields i want.  But I want to 'show the work' (as our math teachers would say) in how it got to the sum.

    For ex.

    instead of just saying calculation - 37

    it would give the fields used for the calculation- work 30 + vacation 7 = 37

    Is that possible?

    I saw in the options there is this feature "Add field to equation as text by default" but it didn't change anything,. 


    E


  • Jed_C
    Replied on August 6, 2020 at 8:14 PM

    You can capture the field text, but you can create your own text string output. Just place the text beside the field that matches the label.

    ex.

    1596759280The Easiest Online Form Builde Screenshot 10

    Try that and let us know how it goes.

  • YouthUnlimitedGTA
    Replied on August 7, 2020 at 12:02 PM

    Thanks Jed! It worked:)

    I have another question also about that widget. Is is possible to include a word field in the calculation? So this is for a time tracking form we do. Some weeks have a stat holiday and I want the staff to review their hours at the end of the form. We don't ask them to enter hours not worked for the stat holiday because it's done automatically for them depending on their time level which differs for each staff. For eg. if a staff works 80%, then their stat holiday hours would be different than someone who works 50%. We calculate everything in hours.  

    I want them to see this below if there was a stat holiday (but only if there was a stat holiday!)

    Work (23) + Stat holiday + Vacation (0) + Sick (7) + Lieu (0) = 30

    Or:

    Work (23) + Stat holiday (Yes) + Vacation (0) + Sick (7) + Lieu (0) = 30

    Or: 

    Work (23) + Vacation (0) + Sick (7) + Lieu (0) = 30 + Stat holiday 

    There can't be a number in the stat holiday brackets because the rest of the calculation is in hours, so i don't want a 1 to be there, since that would be 1 day and not 1 hour.  If we asked them to enter hours for that field, it would work simply but we don't.  


  • Patrick_R
    Replied on August 7, 2020 at 1:25 PM

    Hello! Please allow me some time to look into this. I'l get back to you shortly with an update.

    Thank you!

  • Patrick_R
    Replied on August 7, 2020 at 1:54 PM

    Hello! All the 3 formats that you specified can be achieved. I picked the first one and implemented it here: https://form.jotform.com/202195058492963

    Only if "Stat Holiday" is set to Yes, it will calculate the value for the "Sum of hours you entered on this form" field.

    1596822869chrome capture   2020 08 07T23 Screenshot 10

    You'll have to use a condition for this which will check the value for the "Stat Holiday" field, accordingly it will decide whether or not to fill the Calculation field.

    Q) Does this solve your purpose?
    If it does, then you can clone this form into your account to further check its implementation using this guide: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    I hope this helps. In case it doesn't of if you have more questions, feel free to write back to us.

    Thank you!