1

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? – Ram Feb 13 '15 at 11:03
  • Not only title. I need to search title, body, short description & long description fields in a single textfield. – drup Feb 13 '15 at 11:05
  • 1
    ok..now you can folllow these lines..views->ciclk filter creteria-->add title field--->then click on grouped filter in title field settings. – Ram Feb 13 '15 at 11:07
1

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. – drup Feb 15 '15 at 6:27
  • Please visit this link once for process No 2:--swsblog.stanford.edu/blog/… – RaMeSh Feb 16 '15 at 7:08
  • I need to search in 4 fields (title, body, short description & long description). Combine search will only add two fields right ? – drup Feb 16 '15 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? – drup Feb 17 '15 at 10:28
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.