I have a content type with fields title, body, short description & long description. In view i added these fields. i need to add an exposed search text-field in view to search the search term in title, body, short description & long description fields. Views search term is not happening for me. Combine search is only taking maximum 2 fields. Please help
-
You want to search for title in views page?– RamCommented Feb 13, 2015 at 11:03
-
Not only title. I need to search title, body, short description & long description fields in a single textfield.– drupCommented Feb 13, 2015 at 11:05
-
1ok..now you can folllow these lines..views->ciclk filter creteria-->add title field--->then click on grouped filter in title field settings.– RamCommented Feb 13, 2015 at 11:07
2 Answers
It's Global: Combine fields filter.
Follow Up:-
process No 1:-
Add fields to filter criteria
Add Global: Combine fields filter to filter criteria
Check fields you want to combine in filter's settings
Process No 2:-
Add Fields
Install Views filters populate module.
Add Global:Populate filters to filter criteria
Check fields you want to combine in filter's settings
I think this answers are resolved your problem.
-
process No 1 i failing before itself. I tried Process No 2 with Views filters populate module (7.x-1.1+1-dev) and exposed it. But the search text-field is not showing.– drupCommented Feb 15, 2015 at 6:27
-
Please visit this link once for process No 2:--swsblog.stanford.edu/blog/…– RaMeShCommented Feb 16, 2015 at 7:08
-
I need to search in 4 fields (title, body, short description & long description). Combine search will only add two fields right ?– drupCommented Feb 16, 2015 at 14:31
-
I tried three approaches 1. Using search term field in views 2. Using combine fields in views 3. Using filter populate field in views. All three are failing. Can i have any luck if i do something with views exposed form alter?– drupCommented Feb 17, 2015 at 10:28
I implemented a solution for this problem. I added a field to my content type and made it hidden. In my hook_pre_save, i merged all my fields data together separated by a space and saved that data to my hidden field. in my exposed filter form, i added the hidden field and exposed it to user to search.