Is there a way to use Wildcards (like *) in Views filters. I do not want to give the user the dropdown with all the operators but use a wildcard.
For example, when he writes name it will use "ends with", on name "begins with", on name "contains" and so on. Is there something out there that can do that, or do I have to write it on my own?
-
Contains does exactly same thing... drupal.stackexchange.com/questions/88632/…– Anil SagarJul 29, 2014 at 15:11
-
It does not. it is always working with "like". But if I want to get only the "ends with" or "starts with" items, I just can't get them with "contains" but get all items that contain my search-word. Looks like I have to code that.– AndiJul 29, 2014 at 15:16
-
1You can try views query alter .. For more info drupal.stackexchange.com/questions/76651/…– Anil SagarJul 29, 2014 at 15:19
1 Answer
Rather than filtering on a certain field (and then exposing the filter), try adding a filter of the type 'Search terms'. That uses drupal's search module to search, which has much smarter ways of searching.
-
It seems like I can't use "search terms" in my commerce products view or I can't find it :(– AndiAug 6, 2014 at 8:35