在Drupal 7中,你可以使用
Global: Combine fields filter
以获得所需的功能。通过使用它,您可以选择要执行搜索的多个字段。
To my knowledge there hasn't been an option in drupal 7 to create a single exposed filter in a view which searches multiple fields, while in previous versions there existed modules to do just that.
Using the or
operators is fine but then you get multiple fields in the form.
Add Global: Populate filters
and you can have a single field but then the view never shows anything.
Is there any way or module that will make this work?
Edit: What I didn't notice was the field operators. For some reason the default operator for text fields in views is =
, while a proper search function needs contains
or has word
. I've been looking for the reason I couldn't get it to work for almost 6 months now. Wow. What a pain. /facepalm