Thanks. I have the API already. It integrates with Formidable and lets users put in their address on the form.
However, I'm unaware of how to use the API to make the results of the Form searchable by the end user in a Formidable View.
Unfortunately this wouldn't be a one size fits all but this should be helpful: https://developers.google.com/maps/documentation/places/web-service/search-nearby
This could be fairly simple for you if the businesses are listed in Google's API.
If they are, this is how I would do it. **This only works if the business' name in your view listing are formatted the same as Google's API.** I'm doing something similar with Address' and have forced users to pick an address from Google's Autocomplete to ensure everything is formatted consistently and I don't end up with duplicates. I'm using this to create posts but you can do the same to create formidable entries. It requires wrapping an input with the API. It would then create a drop down below the input that adjusts as they type. You will want to add an input event listener that will force selection from the drop down and not accept typed in entries. All of this can be added to the Custom HTML area in the formidable form Settings page for the form that builds your listing.
For the search:
You will want to create inputs for the required google parameters which you want your users to be able to adjust. Anything else can be a static parameter.
You will use this to call the API.
You will then create a view filter which compares the API response with your entries and only displays the ones found in both. I would compare the name response attribute to your business names.
This may not be exactly perfect based on how your setup but hopefully it points you in the correct direction.
Please login or Register to submit your answer