How to calculate a price based on the distance between two addresses?

  • moversdirectuk
    Asked on April 16, 2016 at 10:05 AM

    How can i make a form that can CALCULATE miles for a deliveries from and see a price and pay for it. and ill pay for it to be made . thanks 

  • Kevin Support Team Lead
    Replied on April 16, 2016 at 11:38 AM

    Yes, this is possible and you will achieve it by using the Driving distance widget, you will find it on this link: http://widgets.jotform.com/widget/driving_distance

    This guide  will help you to add the widget to your form: https://www.jotform.com/help/252-How-to-Add-a-Widget-to-your-Form

    Once you have added the widget to your form you will get the settings window, the 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 o mark the option right below the units, if you do not do your users will need to click on the button to calculate the distance. 

    How to calculate a price based on the distance between two addresses?  Image 1 Screenshot 30

    The result of the distance will be a number that could be used on calculations, in your case to get a total price, to do it you will need to use the Form Calculation widget and you will get this window as soon as you add the widget to your form.

    How to calculate a price based on the distance between two addresses?  Image 2 Screenshot 41

    There you will be able to calculate the total to pay based on your price per mile, here is a guide that will help you with calculations as well: https://www.jotform.com/help/259-How-to-Perform-Calculation-in-the-Form

    If you have more questions, let us know and we will be glad  to help you.