I wanted to create a view with an exposed filter where a user can choose the state of a flag (Flag or unflag). However I wanted it to be optional so by default it would show all nodes regardless of flag state. Right now it will always default to either flagged or not flagged.
I don't have flag cvs checked out right now but in includes/flag_handler_filter_flagged.inc:
$form['value']['#options'] = array(1 => t('Flagged'), 0 => t('Not flagged'), 'All' => t('All'));
Adding the 'All' value to the options form corresponds with the option that has '' as the label in views.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | flag_handler_filter_flagged.inc_.diff | 1019 bytes | marcoBauli |
Comments
Comment #1
marcoBauli commentedneeded same thing, attaching patch
Comment #2
quicksketchThe interaction when using the "All" option is a little bit strange, but Views handles all the validation for us in an acceptable way. I committed to the 2.x branch.
Comment #3
tomsm commentedGreat, just what I needed! Thanks :-)
Comment #5
mooffie commentedFollowup:
#658400: Exposed filter includes "Any" option when "Optional" is unchecked (Regression bug, revert)