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.
Distance CalculatorAsked by Joe on December 07, 2015 at 05:20 AM
Hi, I would like to know if it would be possible for a customer to enter their zip code and based on their Zip Code they enter it would calculate the distance from the zip code entered to point B, Point B (our place of business) would be the center point covering a 40 mile radius.
The form would be used to calculate the distance that we would have to travel from our business to the customers Zip Code. We have the values in a spreadsheet that shows each zip and the distance in miles with the dollar value based on the distance:
zip 12345 = 34 miles ($25)
zip 12346 = 38 miles ($27)
zip 12347 = 42 miles ($32)
I can make each zip code a product with a drop down but the drop-down would be to long as there are over 280 zip codes making the drop-down not the best choice.
I was hoping that if the customer enters his zip code it would do a database look-up and return the correct mileage for that particular zip code with the dollar amount assigned to the distance with a buy now button.
You can also use our Auto Complete widget: http://widgets.jotform.com/widget/autocomp. This widget will only display the options as soon as you type in it. The only downside of this is you cannot set a calculation value in the field properties as opposed to the dropdown, radio button, and check box fields.
If you want to calculate the amount, the best way would be to use a dropdown. Here's how you can perform a calculation in the form: http://www.jotform.com/help/259-How-to-perform-calculation-in-the-form.
Here's how you can assign a calculation value: http://www.jotform.com/help/301-How-to-Assign-Calculation-Value.
Let us know if you need any further assistance.
I don't think this would calculate distance according to zip code entered. can I link the web site that i found this in?
Unfortunately, there is no current widget that can help you with calculating the zip code mileage/distance (customer enters his zip code it would do a database look-up and return the correct mileage for that particular zip code with the dollar amount ). As mentioned by my colleague, the best way to achieve the logic you want is to use the drop down to manually set up this logic.
Do let us know if you need further assistance.