Hi, thanks for the great little module. It will fit my project perfectly if I can get this little need sorted out:

My Dynamic Dependent Filters are only getting any values if I have the Entity Reference view's Contextual Argument set to "Show All Values" when filter value not set.

It works in the sense that when I change the argument filter's value, the DDF filters its values to match. But if I change the "filter value not set" setting on my ER view, then I don't get any values into my DDF.

Is this by design or am I missing something? I never want to load all the values for the ER - only when there is a value set for the argument filter.

Comments

plong0’s picture

Looks like the dependent filters are getting the new values properly... there is just a quirk where it is leaving the class="element-hidden" on the dependent filters even though they now have more options than just "All" (- Any -)

Edit: Made a fix at line 111 of entityreference_filter.js

  if (new_content.length) {
    wrapper.parent().parent('.element-hidden').removeClass('element-hidden');
    if(new_content.length == 1 && new_content.val()=='All'){
      wrapper.parent().parent(':not(.element-hidden)').addClass('element-hidden');
    }
  }
plong0’s picture

Component: User interface » Code
Category: Support request » Bug report
plong0’s picture

There also seems to be an issue that after the Exposed form is submitted (via AJAX), the dependent filters are coming back empty (even though just before the search, they had their proper list of values - filtered by the view argument from the controlling filter)

Edit: this only seems to happen on the views preview. when the view/exposed form are rendered on a page, it seems to work fine.

maximpodorov’s picture

Could you provide a patch for the dev version?

maximpodorov’s picture

BTW, you mix DDF and entityreference_filter.js in one issue, so it's not quite clear what the problem is.