Add Google Map Geolocation Marker to your Form

September 2, 2021

This guide is deprecated. You can now add Geolocation to your form without writing any more scripts. Get it here: https://www.jotform.com/widgets/geolocation

The following guide will teach you how to add a google map marker to your form. This will enable you to get user’s longitude and latitude for any given location using Google Maps.

First off, this involves source code editing so you have to get your form source code and use it for embedding the form.

1. Add a Free Text HTML field to your form and insert this HTML code.

2. Add  a Hidden Box field to your form and copy it’s ID number. Get the google map script here: https://pastiebin.com/52516d192fa3f and replace the geolocationID number with your hidden box ID number. Check these visual guides:

Example:

3. Get your form source code and paste the modified script above at the bottom part of your form source code.

4. Embed your form.

***You can also add this URL on your email notification so when you get submissions via email, you can click the link to view the google map location.

https://maps.google.com/maps?q={geolocation} Replace {geolocation} field variable with your hidden box field variable.

Example Result: https://maps.google.com/maps?q=(8.432639832757532,%20123.28428268432617)

Demo: https://shots.jotform.com/dinesh/sampleGeoMarker.html

If you have questions, feel free to post it below.

Was this guide helpful?
Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Comment:

Podo CommentBe the first to comment.