The widget "link" for better exposed filters doesn't add the "selected" class to a link when a views page is being visited without the GET parameters in the URL.

The view is correctly filtered though (with the filtersettings remembered from last visit). The user just isn't able to see the former filter settings and might think that no filtering is being applied.

Comments

brzbg’s picture

Subscribed

garbo’s picture

I never solved this with BEF. I used Global Filter instead. Just so you know!

brzbg’s picture

mikeker’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Issue queue cleanup... Sorry for not getting to this one earlier!

Based on #3, I'm closing this as won't fix as there seems to be a workaround. If you're still experiencing the original issue, please reopen with specific steps to reproduce.

Thanks.

thomas1977’s picture

Reopening this. Not sure #3 solves everything here (for instance: how do you limit the '.active' class to apply only to the exposed filter and not all other links on the page?).

@ brzbg

How did you make it work? Could you please give a step-by-step instruction? I'm no coding eagle here :-)

Best,
Thomas

thomas1977’s picture

Status: Closed (won't fix) » Active
jjmackow’s picture

you can emulate your desired results by doing some styling on the BEF and radio/checkbox options. Checkbox uses the 'input' and 'label' tags set within a 'div' tag with a class called 'form-item'. style them like so (the sassy way):

.bef-checkboxes,
.bef-select-as-radios{
  display: block;
  text-align: center;
  .form-item{
    display: inline-block;   
    text-align: center;
    margin: 2px 1px;
    input{
      display: none;
     &[type=checkbox], &[type=radio] {
      & + label{
        width: 95px;
        height: 27px;    
        color: gray;
        display: block;
        padding-top: 3px;
      }
      &:checked + label{
        color: red;
      }
    }       
  }
}

note that the input tag is hidden and the label tag is used within the UI to select the option. the :checked psudo is your active option within the set of selections. I set them up as buttons with rounded corners in my intefaces.

Road Kill’s picture

If anyone needs an active state on Better Exposed Filters links.

.bef-select-as-links.jquery-once-2-processed a.active {
color: #33cc00 !important;
}

jkopel’s picture

Status: Active » Closed (won't fix)

It looks like there are multiple reasonable options available here, and there is no reason for BEF to have an opinion on how your links/form elements should be styled.
If there are additional classes that would be useful to add to links or form elements please feel free to reopen this and supply a patch to that effect.
Thanks!