How to calculate a fee based on distance between two addresses using the Driving distance and the Form calculation widget?

  • oxfordchangemakers
    Asked on February 20, 2016 at 11:01 AM

    I want to have a form where a user can put in a pick up and drop off point in the directions widget and then pay an amount based on the output from the directions widget. EG input- 'point a' to 'point b' output- 10Km. Pricing widget takes the 10Km value and works out the price to customer. So if the equation is $5 per Km price equals $50.

    Seems like this might be just a little too advanced for this platform but if you can do it that would be killer!! 

  • Kevin Support Team Lead
    Replied on February 20, 2016 at 10:40 PM

    Yes, this is possible, you will need to use these widgets.

    Form Calculation Widget.

    Driving Distance Widget.

    Follow this guide to add the widgets to your form: http://www.jotform.com/help/252-How-to-Add-a-Widget-to-your-Form

    First, add the Driving Distance widget to your form.

    How to calculate a fee based on distance between two addresses using the Driving distance and the Form calculation widget? Image 1 Screenshot 40

    Add the Form Calculation widget as well.

    How to calculate a fee based on distance between two addresses using the Driving distance and the Form calculation widget? Image 2 Screenshot 51

    Once both widgets are on your form, then open the wizard of the Form Calculation widget and add this operation.

    How to calculate a fee based on distance between two addresses using the Driving distance and the Form calculation widget? Image 3 Screenshot 62

    Take a look on my cloned form: https://form.jotform.com/60508097542962.

    Feel free to clone it.

    Hope this helps.

  • oxfordchangemakers
    Replied on February 21, 2016 at 5:55 AM

    thanks kevin. Is there a way of getting that 'price' input into a payment widget?

  • oxfordchangemakers
    Replied on February 21, 2016 at 7:20 AM

    I managed to work it out. Great stuff

  • David JotForm Support Manager
    Replied on February 21, 2016 at 11:56 AM

    On behalf of my colleague, you are welcome! Please open a new thread if you need anything else, we will be glad to assist you.

  • pradeep
    Replied on May 7, 2017 at 8:50 AM

    hi i am pradeep from india. i have opened a cab service. i just want to know about the fare calculator. i am using the wordpress. in that i am using the visual form builder. i want to add a google api. please tell me how to add the field with the script code... 

     

    if the customer visits our website they will search for cabs by seeing the form

    in that they will chose a origin city and the destination city. so that should be automatically seen and the kms should be calculated by it

     

    can u pleae tell me