I am creating a site where agents can have multiple locations based on city and state. Each city and state will already be stored in the system and the agent should select the cities that they offer their services in via a cred form. Additionally I need a parametric filter that searches for agents based on a city/state combination.
The workflows should resemble something like this.
The cred form for the agent to fill out:
Should list states with their associated cities and the agent will simply check off the cities that they offer services.
The filter for users:
The user should first select a state from a drop down, then the next drop down will display the cities associated with the selected state. once the city is selected and the user clicks the search button, all agents who have selected that city/state combination will be displayed.
Dear bryan,
There is parameter search feature within Views plugin:
Search on the parent/child relationships:
See our document:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/
There are similar option "State" and "City" fields in the search form,
You can see the live demo site here:
hidden link
And create your own live Real Estate demo site here:
http://discover-wp.com/site-templates/
Hope it help
Cool, I have looked into this solution. Before I dive in to much to this solution I want to make sure of one important aspect.
Will each agent be able to have multiple parent locations. Also will they be able to add these locations via a Cred form? This way an agent can service multiple cities.
Q1) Will each agent be able to have multiple parent locations
No, in above demo site, post type "Houses" is a child post type of "City", so one "House" post can correspond to only one "City" post
Q2) Also will they be able to add these locations via a Cred form?
In your case, I suggest you try this:
1) Create a custom Hierarchical taxonomy "location", assign it to post type "agents", and setup the terms like this:
- state 1
-- City A
-- City B
- state 2
-- City C
-- City D
...
https://toolset.com/documentation/user-guides/create-custom-taxonomies/
2) Then you will be able to associate one "agent" post with multiple Cities, and also will be able to add these locations via a Cred form.
Yes this is what I am currently doing, the problem is in the search. To create a parametric search using this taxonomy their will be a drop down with thousands of options. I am told that there is not a way to have two drop downs, one with the states and the other with the cities which populate based on the states selected. Is their a better workaround that has been discovered for this?
About the question:
there is not a way to have two drop downs
It is already in our to-do list, here is the feedback from our developers:
there are plans to improve this, there isn't better workaround for now
And I added this thread into that to-do, hope it will raise our developers attention.
Currently, You can subscribe to our blog to get the updated news:
https://toolset.com/blog/
Or Check out our certified partners:
https://toolset.com/consultant/