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.
If a user wants to hide an input filter, they probably have a good reason for doing so.
I don't think there's a good reason to only allow "standard" filters to be hidden.
The use case for me is Search API views exposed filters.
They're non-standard, so can't be hidden, even though I've implemented a customized search form to override views' exposed filters.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2104101-allow-all-types-hidden-5.patch | 1.72 KB | chertzog |
#1 | better_exposed_filters-allow_hidden_for_all_inputs-2104101.patch | 701 bytes | AaronBauman |
Comments
Comment #1
AaronBaumanComment #2
AaronBaumanDoesn't work because of this clause, which I don't understand well enough to change.
Comment #3
pinkonomy CreditAttribution: pinkonomy commentedDoes this previous patch work?If not,can someone else help on this?
Comment #4
pinkonomy CreditAttribution: pinkonomy commented@mikeker:Could you help on this please?
thanks
Comment #5
chertzogHere is a patch against 8.x. I havent found any issues with it or reasons why hidden cant be applied to any element. It should be an easy backport to 7.x-3.x
Comment #6
chertzogLooks like there are other issues in core surrounding "hidden" form fields. I needed this patch to make this work via ajax - https://www.drupal.org/project/drupal/issues/2313517.
So I dont know what the best solution here is, but the patch above in #5 along with the one in referenced issue makes this all work for me.
Comment #7
PapaGrande@chertzog Can your patch be applied to BEF without the core patch and do no harm? Also, could you add tests?
Comment #8
chertzog@PapaGrande i dont know, i havent done enough testing around it to confirm that. All i know is what was stated above. You would have to test it out yourself to verify no adverse effects. We use composer to manage patches which makes it easy to patch core as needed. I wish you luck.
Comment #9
Neslee Canil PintoWe are trying to deprecate 8.x-3.x, can you please check whether this still exists in 8.x-4.x/8.x-5.x branch.