I have a CCK integer field with a select list widget.

In the Views filter configuration dialog:

The "force single" checkbox is unchecked so that the select list is open showing all options, in the view, allowing the user to select multiple items.

Unchecking the "optional" box does not put the <any> option in the list like it does if both boxes are checked.

You could of course just select all the items in the list, but it's potentially confusing for the user and there's no place to put text to explain this anywhere near the entry boxes, especially in a block.

Even with an explanation, it would clutter up the block, wouldn't fit well and would be an unnecessary complication for the user.

Comments

dejamuse’s picture

Also, it would be better just to display the word "any" and not "<any>".

Or better yet, allow custom text.

dafeder’s picture

Version: 6.x-2.5 » 6.x-2.6

It would be great if someone more familiar with the views handler code could weigh in on this, as I think it's an issue many are interested in. Basically, if you have an exposed filter with a select list, you only get the option if it is set to force single. I know that in a multiple-option select list you can just have nothing exposed, but that is honestly not very intuitive for your average website user. Especially if he has already selected something and can't figure out that he should ctr-click to deselect his option and leave the field blank again. Having an 'Any' option, selected by default, would be much more intuitive.

I've been trying to override it with hook_form_alter to get in there and force an "any" option into the array, but it doesn't work because of the way the GET request is built when the form element is set to accept multiple options.

merlinofchaos’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.6 » 6.x-3.x-dev
Component: User interface » Views Integration

Check with CCK first. This may be a CCK issue.

markus_petrux’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

I think you can unselect items in a multiselect widget using Ctrl+Click over selected items. Other than that, I'm not sure to understand the problem. :-|

druplicate’s picture

Yeah, but believe it or not, control-click does not work reliably in IE with certain OS versions. IE7 on XP for example, causes Windows to open a new session, though I've read this can be fixed by disabling nView Desktop Manager (NVidia cards). This is a problem on my Toshiba laptop but I never bothered to try and fix it since I never use IE.

In addition Joe Average doesn't usually know about that trick.

I'd really like to have the option of using checkboxes (choice to arrange horizontally or vertically) instead of a drop down list because it's immediately intuitive.

My application is a real estate property filter, so this select box is for number of bedrooms. In most RE sites you can select "one or more", "two or more", etc, but that just shows you properties you don't want. It's unlikely someone would select 2 AND 4 but not 3 bedrooms, but other applications might of course be different.

Last but not least, the exposed open select list is just plain ugly and doesn't flow well in a block with other select lists.

But getting back to the original problem, the default selection should be 'any'. With checkboxes you would of course have to have one for 'any' as well.

The default choice of 'any' probably is a CCK problem. I'll wait for additional opinions here before submitting to CCK.

EDIT:

Just discovered the Views Filter Pack module (http://drupalmodules.com/module/views-filter-pack) which allows the use of checkboxes, radio buttons, etc in Views filters.