Form Calculation widget and conditions

  • Mall OfEtsy
    Asked on October 11, 2022 at 3:22 PM

    I'm calculating two values for example A) Value 9 * B) Value 7 = result 63 . But I want to assign a minimum value to the result, for example, when my min value is 70 and my calculation result is 63, I want it to be displayed as 70 in the form. If the value is above 70, I want to see the actual calculation result.

  • Kris JotForm Support
    Replied on October 11, 2022 at 4:26 PM

    Hello,

    Thanks for reaching out Jotform. I am not sure if I understand this correctly but I made a sample on the screencasts attached below, kindly check it out:

    Part one:

    1665519774 6345d09eb0b8d 2022 10 12 04 1 Screenshot 10

    Part two:

    1665519976 6345d168b9a92 2022 10 12 04 1 Screenshot 21

    This can be achieved using Number elements and the Form Calculation widget.

    If that’s not exactly what you’re looking for, can you explain a bit more so I can help you better? 

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

  • mallofetsy
    Replied on October 12, 2022 at 2:14 PM

    Thank you very much for your interest, your answer is very descriptive. But I could not apply the example you gave to my own project because my first value comes from the drive distance widget. In other words, the number of kilometers between two distances, the second value is the kilometer length times the kilometer fee, for example, $5. As a result, the first value is the drive distance, the second value is the kilometer fee. I tried but I couldn't adapt it to the example you gave.

  • Alexander JotForm Support
    Replied on October 12, 2022 at 3:06 PM

    Hello mallofetsy,

    Perhaps what you need in your form is the Driving Distance widget. On the widget, respondents will enter a pick-up point address and a destination address. The widget will then calculate the distance between the two locations. Then, you can use the result to calculate the fare. You can use the Form Calculation widget and/or conditions for the calculation.

    Another very popular method is using this method set out by one of our colleagues here.

    If you can, will you share your form link with us so we can also look into the specifics of what you're doing?

    Reference Guides:

    How-to-Perform-Form-Calculation-Using-a-Widget

    How-to-Insert-Text-or-Mathematical-Calculation-into-a-field-using-a-Condition

    Please give it a try and let us know if you need any further assistance.

  • mallofetsy
    Replied on October 12, 2022 at 3:17 PM

    hello alex.

    I can already calculate pricing with distance. what I need is to apply a minimum amount in the distance calculation.

  • Lauren JotForm Support
    Replied on October 12, 2022 at 4:08 PM

    Hi Mallofetsy,

    Thank you for the further clarification. In my understanding, you are hoping to (no matter what is entered by the user) have a minimum distance calculate. The example you provided in the thread was that if the distance calculation from the widget was 63, but the minimum requirement is 70 - you would want the distance calculator to automatically display 70.

    Unfortunately, with the current configuration of the Driving Distance widget it is not possible to round up to a minimum distance as you have detailed out in your example. However, I'd be more than happy to submit this as a feature request to our Development Team for their review and consideration in future system updates. If this is something you are interested in, please let us know and we can get that process started for you.

    If you have any additional questions on this or would like to provide any further clarification on the request, please reach back out. Once we receive the okay from you, we can go ahead and let the Development team know about this feature request.