I think it would be right if we change widget for Yes/No Checkbox. There should not be 2 checkboxes (Yes and No). There should be Label of field and then 1 checkbox. What you think about this?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NickWebman’s picture

I agree

mikeker’s picture

Assigned: Unassigned » mikeker

As do I, however it's difficult to tell a Boolean field element from a regular list field element when we're showing the BEF settings form. I'll look into it some more to see if I can find a way to do it...

NicolasH’s picture

Did this ever go anywhere? Do people just form_alter their way around this?

Fidelix’s picture

NicolasH, so far it's the only way... doing it yourself.

primerg’s picture

Status: Active » Needs review
FileSize
3.78 KB

Attached is a patch for D6. I'll create a patch for D7 once D6 is ok. Please review if the solution is ok.

one thing I do not still understand is the file better_exposed_filters_exposed_form_plugin.inc
How will I be able to test it?

Status: Needs review » Needs work

The last submitted patch, yes-no-checkbox-1171952.patch, failed testing.

primerg’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Needs work » Needs review

forgot to add the right version.

zmove’s picture

Subscribe. I have several on/off checkbox. I just want a checkbox to enable the filter (checked) or disable it (not checked). Actually, I have 2 radios for each filter (Any, and the filter name) which is no user friendly.

greggles’s picture

#5: yes-no-checkbox-1171952.patch queued for re-testing.

greggles’s picture

The testing system seems to have become confused. Re-uploading the patch from #5 without any changes. All credit to primerg for the work, I'm just doing this to help testing...

mikeker’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

Wrong version... Perhaps that's why the test-bot barfed?

Anyhow I'm reviewing the patch and testing by hand.

mikeker’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Status: Needs review » Needs work

First off, my apologies to all for letting this sit for so long... I had started on this feature request in 7.x and got bogged down by issues where the checked state wouldn't persist and let that get in the way of committing the 6.x patch.

@primerg: It looks like you were building the patch off the 2.0-beta release. It's always best to build from the latest -dev release or from a git clone of the repo. Regardless, thank you for the patch -- I've committed it to the 6.x-2.x branch.

Resetting to Needs Work for the 6.x-3.x and 7.x-3.x branches.

mikeker’s picture

re: #5: the better_exposed_filters_exposed_form_plugin.inc file. That file should not be in the 2.x release. I'm guessing that at some point you installed BEF 6.x-3.x and then overwrote it with 6.x-2.x? It's a good idea to delete the directory entirely before when coping a new version -- that way any directory/file changes don't leave leftover bits and pieces lying around.

mikeker’s picture

Status: Needs work » Fixed

This has been ported to the 7.x-3.x and 6.x-3.x branches. (The 6.x-3.x commit was later refined to remove options that are not available given the filter being edited).

Oddly, in Drupal 7, this option is not available for custom Boolean fields as those are implemented as ordinary list fields so, as far as I can tell, cannot be distinguished from other list fields. If that turns out to be incorrect, please reopen this issue and post a comment.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.