Display Google Maps on The Formyoula Form

In this guide, we will explain how to display Google Maps on the form to search for nearby Places.

Drag and drop three Hidden fields, an HTML field and two JavaScript fields.

image

Rename the hidden fields into Latitude, Longitude and API Key as shown below.

image

Click the pencil icon of the Hidden field named API key and set your API key as the value.

Follow given below link for the API key.

https://developers.google.com/maps/documentation/javascript/get-api-key

image

Click the pencil icon of the HTML field and paste the code.

image

Please use the below HTML code:

<div id="map"><div class="whirl traditional"></div></div>
<style>
#map{

height:500px;
margin: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>

Click the pencil icon of the first JavaScript field and paste the code.

image

Please use the below JavaScript code:

Note: Please change the Field Ids as per your form.

image

Click the pencil icon of the second JavaScript field and paste the code.

image

Please use the below JavaScript code:

Note: Please change the Field Ids.

image

Please try the form.

image

Example form JSON

Google Maps API [Example].json12.7KB

For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂