Is it possible to combine two filter criteria exposed filter into one dropdown Is it possible to combine two filter criteria exposed filter into one dropdown. In drupal 8 I am creating a view to search certain content type. One of the content type has three select list field, I do not want to create three seperate exposed filter dropdown on the search page, Is there is a way to combine all into
one exposed filter dropdown ?
Any suggestions and guidance deeply appreciated.
Even with Better Exposed Filters you will not achieve what you need. As I understood you want one selectbox for the end user which merges three different fields of your content type?
This is not possible out of the box. When filtering the name of the selectboxes and the chosen values will be added to the URL like &quot;?selectbox1=123&amp;selectbox2=abc&amp;selectbox3=xyz&quot; (not exactly, but this is not important). Views does it for you to translate these URL parameters into the field names and the database query.
For your idea you need a way to tell Drupal that &quot;?my_merged_selectbox[]=123&amp;my_merged_selectbox[]=abc&amp;my_merged_selectbox[]=xyz&quot; needs to be somehow translated into the seperated filters / field names and values like above.
The only way would be to write your own views filter plugin. Helpful link: https://zanzarra.com/blog/custom-views-filter-plugin-drupal-8-bounding-box-geofield
I do not know if you have programming skills but what you want to achieve will need custom programming and is not trivial.