Congratulations!!
It was already hour that somebody made a module like this. Thank you.

By the way, when using it in VIEWS the "Optional" option from the exposed filters doesn't work. When seeing the VIEW "All" doesn't appear in the lists of the exposed filters. And the labels of the exposed filters also disappear.

Comments

wim leers’s picture

Title: Congratulations!! » Views: no labels, no "all" option.

Hm, you're right about the labels. In my use cases this wasn't necessary yet, but it's of course something that should be supported.

And indeed, "all" and "none" are currently not available. You always have to select something. That's "by design" currently. That's something I'd like to change too.

Patches are welcome :)

armand0’s picture

Title: Views: no labels, no "all" option. » The "all" option.

Has nobody been able to make that it is Optional? that is to say that shows an option "All" in the heads of the lists.

I have attempted it. But it seems that my knowledge of Drupal is not enough. Although I have some other places, only made with PHP and Ajax in those that I have made it. But here I don't find how to make it.

I hope somebody can get it.

wim leers’s picture

Category: support » feature
wim leers’s picture

Title: The "all" option. » The "none" option.

An "all" option won't be added. A "none" option will. "All" is the equivalent of a select with the #multiple property enabled and then selecting everything, so that's what should happen.

wim leers’s picture

Assigned: Unassigned » wim leers

I just have to rewrite the rendering function at this point. The "required" property of form elements is already being passed through (that's not yet committed though).

wim leers’s picture

Priority: Normal » Critical
Status: Active » Fixed

Committed. Please give the 5.x-dev tarball a try and report back how it works.

armand0’s picture

I don't know. I see a lot of use to an option <all>. For example a vocabulary of cars:
Vocabulary
-cars
--Ford
---Thunderbird
---Fussion
--Nissan
---Hikari
---Tsuru
Now the user should choose the mark of the car and a model should select. To my I would like the user to only choose the mark of the car and to opt for All his models, or an X model.

But I don't see any use to an <none> option. I am already limiting that is not shown that don't want from the filters of the view.
And the user, continuing with the example, it won't look for All the cars that are not a Tsuru of Nissan.

wim leers’s picture

An "all" option is only applicable to selects with the "multiple" property enabled, which currently isn't supported at all. First there has to be support for that.

The "none" option is useful when you don't want to select *anything*, because now you *always* have to select something.

mark matuschka’s picture

The "all" option is necessary in exposed view filters when the filter is optional. See functionality without the module installed. Also it's important to be able to filter by a parent category only, ie. including "all" sub-categories.

Great module by the way. Some teething issues expected early on but you have made a fabulous start.

mark matuschka’s picture

Actually to be consistent with the way exposed views filters work, the top item in the *parent* list should be "all" (as I said in #9) but the top item in *subsequent* levels should be "none" (different to what I said in #9).

In views filters language, "all" is really "any". Existing views filters functionality includes "all" for parent level and "none" for sub-levels. It would be nice to have "all" *and* "none" at the sub-level, but "all" at sub-level is not currently provided by views filters.

Didn't mean it to sound this complex.

wim leers’s picture

Hierarchical Select currently doesn't support selecting multiple items. So it doesn't make sense to select all of them. First we need multiple select support. In fact, the "all" option could be part of the same patch.

Anonymous’s picture

Status: Fixed » Closed (fixed)
Encarte’s picture

Status: Closed (fixed) » Active

I hope I'm following the right procedures by reopening this issue (I apologize if I'm not). The Hierarchical Select 2 now supports multiple select and the «all» option (actually «any») is essential for the use of exposed filters (without it the vocabularies became mandatory and the search returns empty if no tag is selected).

I believe this module has a great potential and it could have a very wide use, but any site that uses exposed filters in views needs this «all» option or, at least some way to disable Hierarchical Select when exposed filters are being used (enabling it only in node edition and in views with no exposed filters).

Best regards.

Encarte’s picture

Version: 5.x-1.0 » 5.x-2.0-rc1
wim leers’s picture

Component: Miscellaneous » Code

Agreed. Completely forgot about this – because I haven't tested HS 2's integration with Views yet.

You will get the ability to set it to an arbitrary name (all/any, whatever you prefer).

Not sure I'll have time for this any time soon though. Sponsoring would allow me to give it a higher priority.

wim leers’s picture

Oh and please start a *new* issue. This was the issue for the ability to have optional form items: http://drupal.org/cvs?commit=82347.

Thanks.

wim leers’s picture

Status: Active » Closed (fixed)