How can I round up the figure in the below form

  • Profile Image
    2daystelecom
    Asked on October 25, 2020 at 07:39 AM

    How can I round up the figure in the below form

    At the delivery fee space

    https://www.jotform.com/build/202962562738564#preview

  • Profile Image
    Cecile_A
    Answered on October 25, 2020 at 10:58 AM

    Hello,

    You can use the round() function in the Form Calculation widget.

    1.Click ... in your Form Calculation widget

    1603637333_5f95905583fd8_48.png

    2.Choose round()1603637353_5f9590695f805_50.png

    3. Populate it with your formula1603637402_5f95909ac3017_47.png

    Result:

    1603637445_5f9590c5ab0ca_46.png

    Calculation : 6.1 * 1.05 = 6.405

    Our forms will not have similar results because you have a condition in your Form Calculation widget. Your formula (distance * 1.05) will not work because of this condition. To avoid this, you may disable or delete the condition.

    1603637543_5f959127e7a92_

    Let us know if you need further assistance.

  • Profile Image
    2daystelecom
    Answered on October 25, 2020 at 11:27 AM

    Thanks Cecile for the response. I am trying to get a base amount that will be hidden and automatically adds up to the total fare in the delivery fee section:

    For example: Fare quote + Base (hidden) = Total Delivery.

    I am struggling a bit with the calculation

  • Profile Image
    Cecile_A
    Answered on October 25, 2020 at 12:36 PM

    To clarify,

    Do you want your Delivery Fee to be based on the calculation below ?

    Fare quote + Base (hidden) = Total Delivery

    If that is the case, all you need to do is replaced 1.05 with your Base field.

    1603643212_5f95a74cdb5c9_

    However, this will show your base field before getting the Fare Quote.

    1603643596_5f95a8cc42e73_63.png

    If you don't want this to happen, you can delete the calculation in your Form Calculation widget and add the following condition:

    1603643678_5f95a91eb6944_64.png

    Please do not hesitate to ask further questions.

  • Profile Image
    2daystelecom
    Answered on October 25, 2020 at 12:51 PM

    Yes please that is exactly what I want:

    Do you want your Delivery Fee to be based on the calculation below ?

    Fare quote + Base (hidden) = Total Delivery


    But I do not want the base to show before the total fee, I want that to be added to the fare quote

  • Profile Image
    Cecile_A
    Answered on October 25, 2020 at 01:21 PM

    Thank you for clarifying. If that is the case, please follow my second suggestion.

    1.Delete the calculation in your Form Calculation Widget. So, it should be empty like the one below.

    1603646288_5f95b35035cdb_

    2.Add the following condition

    1603646220_5f95b30c2a267_69.png

    You may follow this guide if you are not familiar with adding conditions: https://www.jotform.com/help/268-how-to-insert-text-or-calculation-into-a-field-using-conditional-logic

    Please try this one and let us know how it goes.


  • Profile Image
    2daystelecom
    Answered on October 25, 2020 at 01:32 PM

    Hello Cecile,

    It works like magic. Thanks so much

  • Profile Image
    2daystelecom
    Answered on October 25, 2020 at 01:38 PM

    Please do I adjust the figure in the Fare Quote? I can see the base but cannot see the one in the Fare Quote

  • Profile Image
    Kenneth_C
    Answered on October 25, 2020 at 05:55 PM

    Hi there,

    Please note that the Driving Distance Widget only calculates the distance therefore will return a value in Kilometers, so if you intend to calculate the fare, you will have to make a calculation for it.

    Here is my suggestion:

    round((FARE QUOTE * Fare_per_1_km)+Base)

    I hope that helps.

    Best.