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.
We have a situation where we have a date field and are using a secondary "is between" filter and it does not have a label for the "min" field. I'm not clear if this is totally a BEF issue, but I have found a simple way to fix it. So the BEF filter looks roughly like (warning, psuedo-array!):
array(
'#title' => 'BEF label',
'min' => array(
'#title' => '',
// ...
),
'max' => array(
'#title' => 'And',
),
)
So this renders the "min" text field with no label, then the "max" textfield with an "And" label. The patch attached below looks to see if there is a "min" item and adds the title if it's blank. I'm not sure if that's the best way to fix this so let me know.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2019871_add_label_for_is_between_filter.patch-v2.patch | 763 bytes | djschoone |
#1 | 2019871_add_label_for_is_between_filter.patch | 807 bytes | rballou |
Comments
Comment #1
rballou CreditAttribution: rballou commentedHere is how I have patched this to add the label
Comment #2
kenianbei CreditAttribution: kenianbei commentedI'm experiencing the same issue. Manual application of patch doesn't fix issue for me using current dev release.
Comment #3
klokie CreditAttribution: klokie commentedI'm having this issue too. The patch didn't fix it but the hack in #2018173: Numeric between and Date fields in secondary missing titles allowed me to change the labels.
Comment #4
djschoone CreditAttribution: djschoone commentedShouldn't be the patch like this?
Comment #5
mikeker CreditAttribution: mikeker commentedIssue queue cleanup... My apologies for taking so long to address this issue!
This was fixed in #2018173: Numeric between and Date fields in secondary missing titles. Also related is #2429309: Secondary filters don't display Title and Description.