I have some numeric exposed filters and the operation is "is between". Views prints out two text boxes with the label above the first one, the second with a label of "And". However, when I add it to the Secondary section, the "And" label appears, but the main label does not appear.

Looking at the view object, it seems the label for this hybrid field is in the $form['#info'] or something like that and not directly attached to the first, minimum numeric field. So it seems Better Exposed Filters would have to add some code to bring these labels for the compound exposed filters along into the Secondary area.

Comments

Here's some rather hackish code that I did to fix it:

<?php
         
if (isset($form[$identifier]) && isset($form[$identifier]['min']) && isset($form[$identifier]['min']['#title']) && empty($form[$identifier]['min']['#title'])) {
           
$form[$identifier]['min']['#title'] = $form['#info']["filter-$label"]['label'] . t(' Min');
           
$form[$identifier]['max']['#title'] = $form['#info']["filter-$label"]['label'] . t(' Max');
          }
?>

I added this code to around line 1270, just before this line:
<?php
$secondary
[$identifier] = $form[$identifier];
?>

EDIT: Oh yeah, that's in better_exposed_filters/better_exposed_filters_exposed_form_plugin.inc.

Issue summary:View changes

I ended up solving the issue based off of the code above, here is my code below.

Line No. 1364 of BEF 7.3-beta4 file: better_exposed_filters_exposed_form_plugin.inc

<?php if (isset($form[$identifier]) && isset($form[$identifier]['min']) && isset($form[$identifier]['min']['#title']) && empty($form[$identifier]['min']['#title'])) {
           
$form[$identifier]['min']['#title'] = $form['#info']["filter-$label"]['label'];
          }
?>

Code comes before: '$secondary[$identifier] = $form[$identifier];'

When reviewing the code I did not find it necessary to affect the 'max' field because the label was already 'And'. So I can simply change my filter to say 'Post Date Between' which makes more sense. Read out completely it should be 'Post Date Between x And y'.

I do not believe the above is the proper way of dealing with the issue (hence no patch), ideally better exposed filter should detect the date picker option and allow the editing of the two entry box labels.