Hi all -

I'm very excited to see this module, and it functions quite nicely. Is there a way to create a Views filter that uses SHS and has multiple widgets? In other words, if I have a hierarchical taxonomy, and a given node might have more than one term from that taxonomy, is there a way to "Add another" filter?

Best -

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stBorchert’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Active » Needs work

Hi.
Sorry for responding so late.

Hm, initially I thought "hell no, that won't be possible" but now I'm not so sure about this anymore :) The main problem here is we need something similar to "Add new item" as known from unlimited fields.
Maybe this will not make it into the next version but if its technically possible, it will happen.

stBorchert’s picture

I've committed a change to disable "Allow multiple selections" temporarily until I found a solution for this.

mpearrow’s picture

Many thanks - I'm pretty green when it comes to Views, but I will also see if I can figure anything out.

Best -

stBorchert’s picture

Status: Needs work » Postponed

Postponed until a solution (or an idea of a solution) is found.

paravibe’s picture

Status: Postponed » Needs review
FileSize
13.64 KB

Hello,

I needed this functional, so I created a patch for current dev release.
I tested it with differents views and it worked perfect.
So please review and commit it.
Enjoy ;)

stBorchert’s picture

Status: Needs review » Needs work

Applied the patch and opened a node saved before: all elements are hidden now. Seems something went wrong while getting the correct data for the elements.
Sorry, patch didn't apply correctly. Needs reroll.

paravibe’s picture

This patch for this dev version http://drupalcode.org/project/shs.git/commit/5a2a874.
Can you give me more information about errors that you get?

stBorchert’s picture

The patch simply does not apply (especially the views handlers remain unmodified).

paravibe’s picture

Very strange, I have tested it.
Will you commit any code today?
I will create a new patch for newest dev release.
And it will be very helpfull if you enable automatic tests in you project settings.
Thanks.

paravibe’s picture

Status: Needs work » Needs review
FileSize
13.6 KB

A new patch.
Just follow this steps:
git am shs-multiple_choice_in_an_exposed_views_filter-1909140-10.patch
git push origin 7.x-1.x
Don't forget to clear cache.
Please review.

stBorchert’s picture

Status: Needs review » Fixed
FileSize
20.29 KB

Thanks for the patch, now everything works.
Committed to 7.x-1.x-dev.
The only issue I see here is if you have terms on one level with same name it could be hard to select the right one. But the current solution is better than no solution ;)

Screenshot for reference:
1909140-11.png

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

PlayfulWolf’s picture

I think the right solution should be single-choice select boxes