Fitoussi / geo-my-wp

Advanced mapping and geolocation plugin for Wordpress
https://geomywp.com
36 stars 22 forks source link

Search Results Limited to State of Zip Code #59

Closed TechRemarker closed 6 years ago

TechRemarker commented 6 years ago

I see options regards to limiting to state, but none appear to work as desired.

That is if you have a zip code search, and enter say 90210, (which is California) want it to show only california results). If I enter 02101 (Boston), it should only show Massachusetts results, etc.

Is there a way for the 2.0 plugin to look limit the results to the state of the zip code the user enters?

To add, as a temporary solution, I attempted to use limit results by radius. I entered 100 miles on the search field setting, but when searching for say zip code, "60642" it shows 4 results, once is 273 miles away, one is 363, etc. Where is if I enter 90210, it properly doesn't show any results.

Fitoussi commented 6 years ago

Hi Chris, The settings of the address fields filters that you mentioned belong to the "Page load results" tab of the form editor. They will only effect the query that takes place when the form first loads.

Adding the same filters to the submission tab is planned to be part of the Premium Settings extension. However, there are hooks that you can use to produce the same filters on form submission as well. If you know how to use filters/action hooks, then this should not be a hard to accomplish.

TechRemarker commented 6 years ago

Thanks @Fitoussi. Glad to hear additional features will be added later to help with this via the GUI. In the meantime I'll continue to review the code to see if I can accomplish using the existing filters/actions you noted. Have a great holiday!