JotForm User Guide / Advanced Features /

Add Google Map Geolocation Marker to your Form

Add Google Map Geolocation Marker to your Form

This guide is deprecated. You can now add Geolocation to your form without writing any more scripts. Get it here:
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.

Mark your location on this Map

Mark your location on this Map

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


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.{geolocation}
Replace {geolocation} field variable with your hidden box field variable.

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

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:
Contact JotForm Support:

Send Comment


  • surya


  • northwoodsmapping

    Can you have polygons tool on the google map api, so the user can add polygon to the map?

  • gpra_forms

    Why cant you just cut and paste the map address in. this is not simple for basic users......

  • hassan

    if change to satellite mode ?

  • jtledesma

    I added the geolocation widget but the map pin is set in US by default :(

    The map can't detect my current location.

  • Kenric


    I was wondering if this can show a map to us after the user submits the form? I looked into Geolocation widget, and it only shows me the coordinates once the user submits the form.

    We would like to have a map of where the user dropped the pin after he/she submits a form.

  • d4v3g

    This is exactly what I need for a Neighbourhood watch incident form, but I get stuck at the point where I'm supposed to paste the modified script below my form source code. It won't let me paste into the window in which the code is presented.
    What am I doing wrong?

  • Paul

    How would you embed the modified HTML on a Wordpress site and link up the CSS & JS files?

    I've got it all working but lose the styling once I paste the HTML code into Wordpress.

    Thanks for your help, otherwise your tutorial is awesome!