In this post we are going to see how to capture a Google Maps URL and sent it via SMS with Easy Forms.
Requirements:
– Google Places Autocomplete Add-On
– Twilio Add-On (or Nexmo or Plivo)
Steps:
1. Builder Your Form
– Text Field: Label: Name
– Tel Field: Label: Phone Number
– Text Field: Label: Address
– Snippet Field: Content:
<div id="map" style="height: 400px;"></div>
– Hidden Field: Label: Map URL
– Hidden Field: Label: Latitude
– Hidden Field: Label: Longitude
– Button: Submit
Selected Theme: Blue Denim
Preview (In spanish):
2. Conditional Rules
Add new conditional rule:
– Condition: “Address” is present
– Action: Format Text Field “Longitude” & “Latitude” To “Map URL” as https://www.google.com/maps/search/?api=1&query={{hidden_2}},{{hidden_3}}
3. Google Places Autocomplete settings
In the add-on settings we need to select the form and map their fields:
– Autocomplete => Address
– Latitude => Latitude
– Longitude => Longitude
– Map Selector => map
– Show Map Marker => Yes
Also, we need to enable the Browser Geolocation.
4. Twilio settings
In this add-on settings we need to configure the phone numbers and the SMS message:
Business Name localization in {{ Map URL }}
Or we can use the Hidden Field ID:
Business Name localization in {{ hidden_4 }}
That’s it!
When our form has been submitted, we will receive an SMS notification with the Google Maps URL.
And all the data will be captured by the system.