Skip Navigation

[Resolved] Creating a multi-value field and using that in a drop-down filter

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to be able to create a multiple-select custom field, and allow Users to select multiple values of that field in a View custom search filter.

Solution: The best option for selecting multiple values in a custom field is "Checkboxes". Views then offers a multi-select style filter for custom search views.

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#623449
Screenshot 2018-03-08 14.09.25.png

Tell us what you are trying to do?
* I have a list of businesses, each with simple information like name, address, town, state, etc.
* Each business also has a list of characteristics, e.g., "Hospital", "Medical Practice", "Emergency/Urgent Care Facilities", etc. (there are about 30 possibilities.)
* I currently have a drop-down named "town" to select from - when a town is selected only those businesses in that town appear on the list. Works spectacularly!
* I would like to have a drop-down that lists the 30 characteristics, and when selected those businesses that have that characteristic will appear.

- Any thoughts on how to accomplish this?

- On other platforms I've used in the past, some have a field type called multi-value - where you could enter multiple values in that one field, and then use the drop-down against that. Lotus Notes was this way I believe, as is SharePoint. (I could easily be wrong...)
- I could create another database table and do a join - but that seems to be increasing the complexity.

Is there any documentation that you are following? Toolset web page.

Is there a similar example that we can see?

What is the link to your site? hidden link

#623482

Hi, in Types we offer the "checkboxes" custom field type that can be used to select one or more options in a custom field. Then in Views you can create a "multi-select" type filter to give your Users the ability to select from one or more characteristics in a multiselect box, and see the matching results. You can also use the "checkboxes" filter type to perform a similar search, if the multiselect filter type isn't ideal for your site.

We also give you the ability to create custom taxonomies. You could create separate terms for each characteristic, and apply those taxonomy terms to any post. Then you could create a multiselect filter in a View and filter by your custom taxonomy.

Let me know if you have questions about either approach.