Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage

  • tabuenagroup
    Asked on April 15, 2024 at 3:40 PM

    For example, When "miles" reach a curtain mileage, we can charge $ on a mileage range. (hopefully this make sens)


    another example


    Let say mileage is 40 miles we multiply by $3/mile....

    then let say i want to set up a rule, if its 40 miles, the rate will change to $4/mile

  • Hilary JotForm Support
    Replied on April 15, 2024 at 8:23 PM

    Hi Tabuena Group,

    Thanks for reaching out to Jotform Support. Can you share us the form URL so that we can see which question that you are referring to? We can set a formula for this. For example, for the first 40 miles, it would mulitple by $3 and mulitple by $4 for the remaining miles.

    Once we have a better idea of what’s going on, we’ll be able to come up with a solution.

  • tabuenagroup
    Replied on April 16, 2024 at 1:57 PM
  • Jefferson JotForm Support
    Replied on April 16, 2024 at 2:43 PM

    Hi tabuenagroup,

    Thanks for getting back to us. I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    In the meantime, let us know if you need any more help.



  • Jefferson JotForm Support
    Replied on April 16, 2024 at 7:30 PM

    Hi tabuenagroup,

    Thanks for patiently waiting. We can set a formula for your form that will change based on the miles generated by the Driving Distance widget. The first 40 miles would multiply by $3 and $4 for the remaining miles. Here's how to do it:

    First, we need to set the formula to get the value of the miles from the Driving Distance widget, then compute it based on the first 40 miles multiplied by $3 and $4 for the remaining miles. Here's how to do it:

    1. In Form Builder, click on the Build tab in the orange navigation bar at the top of the page.
    2. Click on the Widgets tab on the left side of the page.
    3. Drag three Form Calculation Widgets to your forms. Rename it with Miles, First 40 miles, $3, and Over 41 miles, $4.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 1 Screenshot 160
    4. Click the Wand Icon in the Miles Form Calculation Widget.
    5. Click the Add Field button.
    6. Select the Distance *must type the full address, then click "CALCULATE"* Driving Distance Widget.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 2 Screenshot 171
    7. Click the Save Button.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 3 Screenshot 182
    8. Click the Wand Icon in the First 40 miles, $3 Form Calculation Widget.
    9. Click the Add Field button.
    10. Select the 8. Miles option.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 4 Screenshot 193
    11. Add * 3 to the formula.
    12. Click the Save Button.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 5 Screenshot 204
    13. Click the Wand Icon in the Over 41 miles, $4 Form Calculation Widget.
    14. Click the Add Field button.
    15. Select the 8. Miles option. Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 6 Screenshot 215
    16. Add * 4 to the formula.
    17. Click the Save Button. Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 7 Screenshot 226

    Next, we need to hide the form calculation widgets, here's how to do it:

    1. In Form Builder, click on the Build tab in the orange navigation bar at the top of the page.
    2. Click the Gear Icon to open Form Calculation Properties.
    3. In the Form Calculation Properties, click on the Advanced tab.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 8 Screenshot 237
    4. Turn on the Toggle Button named Hide Field.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 9 Screenshot 248
    5. Implement the steps to the First 40 miles, $3, and Over 41 miles, $4 Form Calculation Widget. Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 10 Screenshot 259

    Next, we will implement the condition where the $3 charge will only display for the first 40 miles, then the $4 charge for the remaining miles. Here's how to do it:

    1. In Form Builder, click on the Settings tab in the orange navigation bar at the top of the page.
    2. Click on the Conditions tab on the left side of the page.
    3. Click the + Add Condition button on the Conditions window.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 11 Screenshot 2610
    4. Click the SHOW/HIDE FIELD option.Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 12 Screenshot 2711
    5. Add the following conditions:Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 13 Screenshot 2812Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 14 Screenshot 2913

    Here's the screencast of the final output:

    Form: DRIVING DISTANCE/FORM CALCULATION: $ per mile change when it hits a curtain mileage Image 15 Screenshot 3014

    Give it a try and let us know how it goes.



 
Your Answer