Forum
Filtering events by zip code?
Hi,
I have a potential upcoming project that'll need to allow visitors to enter their zip code and see all the upcoming events occurring in their area. The total number of events for all zip codes will probably be in the hundreds. If the zip code is one of the fields when entering an event in Perch, is it possible for a visitor to input their ZIP code and then see only the events in their area? If so, are there any examples of this kind of filtering available?
Thanks!
Are you talking about needing some sort of geographical search, or simply comparing one zip code to another?
At this point, just displaying events that match the same zip code, though ideally a search of nearby zip codes is ideal.
So you should be able to do that with a basic filter
Thanks. I guess where I'm tripped up on is how to get the user-entered ZIP code into the filter. Would I use the same techniques here?:
https://solutions.grabaperch.com/architecture/user-filtered-lists
I'm not sure if perch_event_custom works the same way as the examples in the docs above for perch_content_custom user-filterable lists.
Thanks!
Yes, same technique, or if they have accounts, from the member data.