A filter in views based on a checkbox, which is using images as a possible value, has only options '' and an empty line.

I did the following:
1. Installed Drupal 6.12 with CCK6x-2.3.
2. Created content type 'CCC'
3. Created field 'FFF' in 'CCC' with type 'Integer' and 'single ON/OFF checkbox'
4. Specified in the list of allowed values:

0|<img hspace="0" height="10" width="10" vspace="0" alt="нет" src="/sites/default/files/pictograms/option_no.gif" />
1|<img hspace="0" height="10" width="10" vspace="0" alt="есть" src="/sites/default/files/pictograms/option_yes.gif" />

5. Created a content of type 'CCC'. The image is shown OK.
6. Created a view 'VVV' with filter for 'FFF'. If the filter is exposed, I can see in the list of allowed values two empty lines. That's the first problem, since I can't configure an operator 'Is one of'.
7. In the preview and in the view shown to user in the filter I can see '' and empty line. So user can not see what he is selecting from.

I've attached 2 images:
filter_with_empty_line.gif - filter shown to user
filter_with_empty_line2.gif - empty lines while configuring filter in Views

I expect filter to have values equal to image alter text (the most reasonable behaviour) or CCK should allow to specify a text which will be shown in the filter.

Comments

savvadia’s picture

Title: Empty filer (ANY, empty line) if possible values for checkbox are images » Empty filter (ANY, empty line) if possible values for checkbox are images
Durran’s picture

Title: Empty filter (ANY, empty line) if possible values for checkbox are images » CCK, Views filter allowed values image

Did you ever find the results for this? I use this oddity too and have this issue, or possibly this is an incorrect manner on which to read results. I feel that if I had known more about drupal when I added this function I would have used another method such as flags, rules and/or conditional actions. I'd like to know your case scenario and how or if you fixed it. Thanks :)