Is it possible to search by area code and get results by distance radius?

  • jcrowe
    Asked on June 2, 2015 at 11:48 AM

    We want to create a search form that allows users to input their location and search for specific locations closest to their location. Is there a way to make this possible?

     

    Thank you!

  • Mike_G JotForm Support
    Replied on June 2, 2015 at 1:32 PM

    Are you asking for a way for form submitters to enter their location on the first field and on the second field they will be entering another location then, all of the locations that matched the one that is in the second field will show and it includes the distance of that location from the one entered on the first field? Is that correct? For example, on the first field they will enter their house address and on the second field they will enter a specific name of a restaurant, then all of the restaurant with the same name as the one on the second field will show. Kindly clarify what specific feature you would like to have on your form. 

    Also, you might want to check JotForm's available Mapping widgets. Thank you. 

  • jcrowe
    Replied on June 2, 2015 at 3:40 PM

    Not quite. They want to be able to enter their location and then have the closest location of a vendor come up based on their location and a distance radius.

    So we will enter in specific known locations and have those stored and then after a user enters their location they repopulate in order to whom is closest.

    Does that make more sense?

  • raul
    Replied on June 2, 2015 at 5:15 PM

    I presume that what you're trying to accomplish is something like a store locator, is that correct? If so, unfortunately, we don't have such widget.

    For this, you could try using the Geolocation or Address Map Locator widget to know the current location of your user and then post that information to another script (written in your website) that will do the search for the nearest store. You can find an example on how to do this here: https://developers.google.com/maps/articles/phpsqlsearch_v3

    Let us know if we can be of further assistance.