Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Motivation:
I use BEF to expose some filters as "hidden" fields, and I manually build links to the filters i want to expose.
Problem:
The "Apply" button still appears, even though there are no visible filters to apply.
Solution:
If all exposed filters are "hidden", then hide the "Apply" button as well.
Filing this as a bug, but it's arguably a feature request.
Patch forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#9 | Apply button still there.png | 1.83 KB | pal4life |
#1 | bef-6.x-1.0-hide-submit-1149254.patch | 1.53 KB | AaronBauman |
Comments
Comment #1
AaronBaumanThis patch is rolled against 1.0, but applies cleanly (with offset) against dev.
Comment #2
mikeker CreditAttribution: mikeker commentedA slightly changed version has been committed. Thanks for the patch!
This fixes the issue on D6 for Views 2.x and 3.x, but needs to be ported to D7.
Comment #4
mikeker CreditAttribution: mikeker commentedWhoops... Should've left it at needs work as it still needs a D7 forward port.
Comment #5
mikeker CreditAttribution: mikeker commentedCommitted to the 7.x branch.
Now I can mark it as fixed...
Comment #6
heivoll CreditAttribution: heivoll commentedShouldn't the same also be true for when all filters are displayed as links, or links + hidden?
Comment #8
pal4life CreditAttribution: pal4life commentedThis is an issues in D7.
So opening this again.
I selected the Better Exposed Filter setting for my exposed filter to Hidden. It hid the field but the apply button is still there.
Comment #9
pal4life CreditAttribution: pal4life commentedThe lone apply button.
Comment #10
mikeker CreditAttribution: mikeker commentedIssue queue cleanup... My apologies for taking so long to address this issue!
I believe this is fixed with the code committed in #1446962: hide the form submit button if all filters are links. Please reopen if that is not the case.
Thanks.
Comment #11
mikeker CreditAttribution: mikeker commented