How can I have the location to be a link to Google Maps?

  • Profile Image
    TortolaExpress
    Asked on November 13, 2017 at 05:06 PM

    Hello,

    I'd like a form where the person filling out the form selects a location on the map in the form and the form saves a google link to the location. (Note, this is not to show where the person is currently located when filling the form).  

    An example of the question is: "Where do you want us to deliver your package?" and the user would then select the location on the map.

    I found a map widget that almost does it.  it finds an address and gives a lat and long, but no link to google.  I'd want the person reviewing the submissions to be able to look at the submissions and see a link to the exact location used on the map.


  • Profile Image
    Kevin_G
    Answered on November 13, 2017 at 08:04 PM

    I have been testing and was unable to find a widget that will met your requirement, none of the widgets will show a link to the Google Maps location, the default address field will display a map on the submissions page if the entered address is valid. 

    However, I think you may achieve it with a workaround, for example, you may use the Geolocation widget to get the lat and long only and then you could generate the query to show where the location is on the map. 

    Here are the steps: 

    1. Add the Geolocation widget to your form and configure it to have the long and lat only. 

    15106207951.png

    2. Add a text element to the form and add the link like this: https://www.google.com/maps/search/?api=1&query={YourFieldName}

    Replace the "YourFieldName" with the name of the Geolocation widget, this guide will help you getting it: https://www.jotform.com/help/146-How-to-Find-Field-IDs-and-Names 

    15106212692.png

    15106212923.png

    You will notice that the link changes as you change the location, unfortunately, I could not get it have an hyperlink so your users will need to select the link and open in a new tab. 

    Also, instead of displaying the link on the form you could include it in an email, the process will be basically the same you just will not add the text element. 

    Here's my sample form: https://form.jotform.com/73167426735967 

    I hope this helps.