Summary
Transform any exposed textfield filter of a webform submissions view into multiple drop-down list.
Download this module: https://www.drupal.org/sandbox/neschi/2522034
Motivation / Problem
Let's say you have a Webform where you ask people their name and for their favorite fruit. Let's say a long list of users complete this form, and that you need to get the names of all the people who like a specific fruit (e.g. apple).
A simple way to solve this is creating a "Webform submissions" view, adding the needed relationships to it, which will represent the webform fields. This will allow you to add the corresponding "Fields" and "Filter Criteria" to the view:
But what would happen if the list of fruits is too large (and you also don't want to show the user's favorite fruit but just their name)? In this case, you will have to remember all the options you gave the user to choose between, so to enter one by one into the view exposed textfield filter (and getting, maybe, 0 results, not because there are no users who likes the option you selected but because that option does not exists).
Solution
With Webform Selectable Filters, you can transform any textfield of this view, into a drop-down list, auto-filled with every option of that question of the webform:
Simply connect the webform and the view on the module's admin page:
And change the "Filter Identifier" of the exposed filter that you want to transform to a drop-down list to "filter_" + the machine name of the question:
Then go back to the rendered view and you will be able to filter the results easily just choosing the option you want:
Extras
And what would happen if you want to get, in the same list, all the users who likes apples and all the users who likes bananas? Just select more than option from the drop-down list:
But don’t forget to verify that the "Filter Criteria -> Operator" of the exposed filter is OR and not AND:
Download this module: https://www.drupal.org/sandbox/neschi/2522034