The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Formidable Pro integration with a street address verification/autocomplete service
I'm wondering if there is an existing solution to integrate real-time street address autocomplete/verification service with FP forms?
For example, this is a Google street address autocomplete service:
<a href="https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform" title="Google Map Address Autocmplete">test</a>
August 11, 2014 at 6:20 am
I got it figured out. Was actually pretty easy.
1) First, load the Google Maps/Places API library in your WP header file.
2) Add the Google Maps Styling to your style.css file (in a child theme of course):
3) Add the javascript code to connect the Google Maps API library to your Formidable Pro form, once again in header.php (again in a child theme):
4) Change the variable name to match your TEXT input field in your Formidable form:
'field_complete' is the final field name created by Formidable. In the forms creation interface, I changed the field key from the normal randomly generated key to 'complete'.
Currently, the Formidable field stores everything from the Google API in that single field. I'm working on breaking it apart into individual fields (i.e. street address, zip).
Hope this helps others.
November 18, 2014 at 8:18 am
Hello there and thank you for your help,
I have created a child theme, added this code in the <head> tag.
and added the css code to the style.css
I used field_origin and reassigned an "origin" key to the text field.
It still doesn't work. (origin field in this site)
Thank you.
May 1, 2015 at 1:00 am
Hi Invisionstudios - did you find out how to break the google places address information into individual parts i.e. street, suburb etc and parse it into the formidable fields? if so, do you mind sharing how you did this?
Many thanks.
July 24, 2015 at 1:44 pm
I never did bother with breaking the address info into separate fields, although I would still like to do that.
September 5, 2015 at 4:31 pm
@invisionstudios
I'm trying to figure out how to break out the address info into separate fields, have you had any luck yet? If so, would you post your solution?
April 29, 2016 at 12:52 pm
Has there been any activity around integrating a location auto-complete tool into Formidable? I'm specifically looking for a way to auto-complete a set of address fields to make form entry easier and faster for users.
I found this post and these two others:
https://formidableforms.com/help-desk/geocoding-autocomplete-current-location/
https://formidableforms.com/help-desk/adding-google-places-autocomplete-2/
It would be a great feature and one that's been requested for several years. Any chance it's in the works?
I also found this add-on: https://geomywp.com/add-ons/formidable-geolocation/
Does anyone have experience with that plugin? Or possibly another recommendation.
I don't think I'm good enough at javascript to get this working myself, hence my need for an out-of-the-box or add-on solution.
April 29, 2016 at 1:46 pm
@wurdz, I ended up using Google's Geo-location API. I wrote a script that'll break out each part of the address into it's own form field. If you'd like that script I can post it later once I get home.
April 29, 2016 at 2:17 pm
That would be great, @VanLuda. Thank you.
April 29, 2016 at 2:19 pm
Okay, it'll be a couple hours. But I'll get it to you.
April 30, 2016 at 1:18 am
Alright, sorry for the delay.
First and foremost, you're going to need a Google Maps API Key which you can get here: Google Developers Console
Once you have that you'll need to copy the API Key into the Script located here:
https://gist.github.com/CarlVanderLaan/1b08de8e8262d31407f4d6fa53e7d90e
Then watch this video and I'll show you how to set this up:
https://youtu.be/aydgIfNjKP8
April 30, 2016 at 12:21 pm
Excellent summary and video, Carl. Thanks so much. --Casey
May 3, 2016 at 8:52 am
@VanLuda, I got this working. It's not too difficult and your info and video made it easy!
Say I wanted to use a field key/name other than "autocomplete," e.g., "abcxyz." I think I can do that by changing each instance of the "autocomplete" name in the script. Could that be simplified by adding a line along the lines of this?
autocomplete = abcxyz //Assign the field name used in the script to the field for this specific form
Thank you again for your help.
May 3, 2016 at 9:30 am
In the script where it says document.getElementById('field_autocomplete')),
Just change field_autocomplete to field_abcxyz
May 3, 2016 at 9:35 am
Ah, duh. Easy enough. I was reading it incorrectly before.
November 20, 2018 at 5:42 am
@VanLuda
What i'm trying to achieve can be seen in the attached screenshot.
(I made this work with Gravity Forms and an add-on plugin for Google Autocomplete)
I now need to make it happen on Formidable Forms though...
We want users to just see two fields: City and Country.
When they enter just a few letters in the city field, the rest of the city name should autocomplete as well as the country should automatically complete (without user input).
So unlike what you were showing in your Youtube tutorial, we don't one field where an entire address appears. We only want them to indicate a City, and then have that City AND then the matching Country to autocomplete in one go.
Is that achieveable? And would you please be so kind to let me know how to proceed?
Much appreciated!
Attachment:
Discussion closed.