What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Calculating fare based on a driving distance using webform

    Asked by pradeep on May 07, 2017 at 09: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

  • Profile Image
    JotForm Support

    Answered by Mike on May 07, 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.

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

    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.

  • Profile Image

    Answered by pradeep on May 07, 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
    ...
  • Profile Image
    JotForm Support

    Answered by Jan on May 07, 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.

  • Profile Image

    Answered by dewebbouwerij on May 08, 2017 at 04: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???