How to calculate price based on distance between two addresses with widgets?

  • designer5191
    Asked on January 29, 2019 at 7:11 AM

    Hi,


    how to create booking form like this: 

    booking form for calculate taxi transfers prices  

  • Mertkan JotForm Developer
    Replied on January 29, 2019 at 9:10 AM

    This is possible and you will achieve it by using the Driving distance widget and Form Calculation widget. This guide will help you to how to add the widget to your form. 

    Firstly, you should add the Driving Distance widget. Once you have added the widget to your form you will get the settings window,  you need to scroll down and search the option Default Distance Units and set miles as the units, if you want the widget to auto-calculate the distance you will need to mark the Auto calculate option.

    Please check the GIF is shown below.

    How to calculate price based on distance between two addresses with widgets? Image 10

    The result of the calculation will be a number. Then, you can use this number in Form Calculation widget.

     Please check the GIF is shown below for adding Form Calculation Widget and use that value in order to calculate a price. 

    How to calculate price based on distance between two addresses with widgets? Image 21

    You will see Driving Distance result in your From Calculation widget 'add field' area. Then you will be able to calculate what you need. For example, your Driving Distance result equals = 10, you can multiply with the constant value and the 'Form Calculation' widget's result will be shown in the input area. 

    You can check the guide for detailed information.

    If you have other questions or concerns, please do not hesitate to let us know.