well, topic is somewhat strange so i'll explain
i got content type 'restaurant' and cck text field 'options', with "Check boxes/radio buttons" and multiple values, so, when i am adding 'restaurant' content i can check some of options like: vegetarian menu, card payments, parking, non-smokers room and so on.
Now, i created some test places, with different options, and now i want to make an view with some exposed filters, so my website guests could filter the list by options
and here is the problem - filters for cck text fields have only "Is one of" and "Is none of" operators. And I need "Is all of" operator, because my visitors would look for restaurand with all options he has marked, and now views doesn't support it,
Another issue - is there any hope to make this filter not an multiple values list, but as a group of checkboxes?
regards!
btw. test site is http://drupal.creativeworks.kei.pl/restauracje, and the problem is with 'opcje' and 'kuchnia' (which stands for kitchen)...
Comments
...
Please file a bug. This feature is a must-have.
But not yet. Let's first try to prepare a patch. Open 'text.module' and change:
'operator' => 'views_handler_operator_or',
to:
'operator' => 'views_handler_operator_andor',
And clear the cache. (Views caches these definitions so we must clear the cache.)
You should now see an "Is All Of" operator too. Please test it extensively, and if it works include this info in your bug report.
(BTW, I wonder if the 'CCK taxonomy' module has this 'Is All Of' feature.)
(BTW#2, remember to include the 'Node: Distinct' filter because you don't want duplicate nodes when using the 'Is One Of' (OR) operator.)
I wouldn't be surprised is somebody has already written a module that converts multi-selects to checkboxes. If not, create a module and implement hook_form_alter:
We need to get rid of the first checkbox ('All'), but I don't have time right now, have to go....
gr8 answer - adding and to
gr8 answer - adding and to the operator fixed my first issue, i'll test second one by this evening
--
Using Drupal since 2005
My Drupal blog - http://blog.elimu.pl/category/drupal/
My Web Dev Company - https://palikowski.eu
My personal blog - http://palikowski.net/blog
issue
bug report - http://drupal.org/node/194818
--
Using Drupal since 2005
My Drupal blog - http://blog.elimu.pl/category/drupal/
My Web Dev Company - https://palikowski.eu
My personal blog - http://palikowski.net/blog
just perfect
i cannot believe - it is working just right now :) http://drupal.creativeworks.kei.pl/restauracje
now... Do you know any way to layut those filters and options like that:
http://emiasta.superhost.pl/restauracje.png
I mean -
1) change layout of filters
2) break checkboxes filter into 2 columns
anyway thanks!
--
Using Drupal since 2005
My Drupal blog - http://blog.elimu.pl/category/drupal/
My Web Dev Company - https://palikowski.eu
My personal blog - http://palikowski.net/blog