Hide labels for wrapped filters

Created on 17 September 2024, 5 months ago

Problem/Motivation

When BEF's "Hide the label" is used on wrapped multi-input filters (e.g. geofield's proximity filter), it does not work. This is because BEF is still looking for the filter using the original identifier, but Views has already wrapped the filter in a fieldset whose name is the original field name + _wrapper.

See https://github.com/drupal/drupal/blob/9258113bc8f45ec8b6f6ac4035c58ab21f...

Steps to reproduce

- Set up Drupal with BEF, geofield, and a content type with a geofield.
- Set up a View of those content types with a Proximity filter on the geofield.
- Configure the filter to use BEF and enable "Hide the label".
- View the filter.

The filter will still show its label (as the fieldset's <legend>) regardless of "Hide the label"'s setting.

Proposed resolution

- When the field is wrapped, hide the wrapper's label.
- When the field is NOT wrapped, hide the field's label.

Remaining tasks

- Patch
- Review
- Merge

User interface changes

- When enabling "Hide the label" on wrapped filters, it will now hide the wrapper's label.

API changes

- None

Data model changes

- None

πŸ› Bug report
Status

Active

Version

7.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fskreuz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024