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

3
  • You want to search for title in views page?
    – Ram
    Commented Feb 13, 2015 at 11:03
  • Not only title. I need to search title, body, short description & long description fields in a single textfield.
    – drup
    Commented Feb 13, 2015 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
    Commented Feb 13, 2015 at 11:07

2 Answers 2

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.

4
  • 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
    Commented Feb 15, 2015 at 6:27
  • Please visit this link once for process No 2:--swsblog.stanford.edu/blog/…
    – RaMeSh
    Commented 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 ?
    – drup
    Commented 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?
    – drup
    Commented Feb 17, 2015 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 and acknowledge you have read our privacy policy.

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