Calculating fare based on a driving distance using webform

  • pradeep
    Asked on May 7, 2017 at 9:58 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

  • Mike
    Replied on May 7, 2017 at 10:45 AM

    I would like to suggest trying a Driving Distance widget field on form. The widget will calculate an approximate driving distance based on Google Maps API.

    Calculating fare based on a driving distance using webform Image 1 Screenshot 30

    The driving distance can be also used in combination with custom calculations.

    Calculating fare based on a driving distance using webform Image 2 Screenshot 41

    Demo form: 

    https://form.jotform.com/71264317151954

    However, you will not be able to adjust the code of the Driving Distance widget. If the widget is not flexible enough, you might consider getting a form source code and host it with your custom code modifications on your website.

  • pradeep
    Replied on May 7, 2017 at 11:43 AM
    sir thanks for replying me... sir how to get this form and how to install
    in wordpress sir...can u help me in this please....
    i want to add currency in indian rupee. the distance calculator is very
    nice sir
    please can u help me out of this
    ...
  • Jan
    Replied on May 7, 2017 at 12:29 PM

    You can embed the form in Wordpress with the help of these guides:

    Adding-Forms-to-Wordpress-org-Version
    How-to-embed-a-form-to-Wordpress-com

    If that doesn't work, please use the iFrame method. Here's how: Getting-the-form-iFrame-code.

     

    The Form Calculation widget doesn't dictate any currency, it is giving a value. As you can see on the formula provided by Mike, it shows ($ DrivingDistance * 3).

    "DrivingDistance" = distance between 2 locations (KM, M etc.)

    "3" = price per distance (KM, M etc.).

    You can change the value of "3" to you preferred amount. After that, you can just replace "$" with "Indian Rupee symbol".

    Please check this guide for more information about Form Calculation: How-to-Perform-Form-Calculation-Using-a-Widget.

     

    Hope that helps. Thank you.

  • dewebbouwerij
    Replied on May 8, 2017 at 4:12 PM

    I tried this for my site and it does the job. However 1 big issue: when completing the address field on a desktop it has auto-suggestion of Google Maps  while typing. This one is very important topics me, but sadly when completing thé form on my smartphone, this autocorrection just doesn't seem to ben there???
  • Cody
    Replied on March 29, 2018 at 5:12 PM

    Hello,

     This works for me... but I would like to add a base pickup rate. How would I calculate that in?

    thanks