First off thanks for the great hacks!

The auto-submit works great for all exposed filter except for a hierarchical select filter. I was looking for it to work for both the parent and child selections, however neither of those seem to update until another exposed filter is utilized. I was attempting via the latest dev.

Thanks again!

CommentFileSizeAuthor
#2 Views_auto_update.odp239.62 KBpavanut

Comments

infojunkie’s picture

Can you please try with the latest dev release? It contains (untested) support for hierarchical selects.

Sorry I realized you already tested with the latest dev. Can you explain your scenario in more detail to help me reproduce it?

pavanut’s picture

StatusFileSize
new239.62 KB

Sure! Let me know if there's any information that I don't include.

I'm on Drupal v 6.16, with php 5.2.10.

Modules I have installed are CCK, Views, and Hierarchical Select.

Within Taxonomy, I have two Vocabularies defined. One of the vocabularies is location: State as the parent term, and City as it's Child. The second is a vocabulary of "type of nonprofit": Homeless, Arts, Disaster Relief, etc.

Within views, I am using two exposed filters for each of the taxonomy terms. With the hierarchical select module installed, once you select a state (parent), a list of cities comes up within a new select box. However within the view, selecting a state and then a city does not auto-update the page. Once the second filter (type of nonprofit) is selected, the auto-update occurs. I've also tested this with various third exposed filters as well, and those all worked. Only the hierarchical select filter did not work in any of the cases for the parent or child.

I've attached a few screenshots here in an OpenOffice Presentation document with comments on it. If you need it in any other format, I can definitely convert! Thank you for your time! It is very much appreciated! I'd be happy to answer any more questions. Thanks again!

infojunkie’s picture

Category: bug » feature

I understand now: you're using the Hierarchical Select module - somehow I'd missed that. Views Filters Auto-submit does not yet support Hierarchical Select, but its internal infrastructure does allow for new filter types to be handled. So I'm marking this as a feature request to support HS.

pavanut’s picture

That would be great! Thanks, I guess it definitely would be a feature request.

tobiberlin’s picture

subscribing

ericmaster’s picture

subscribing

cnolasco’s picture

subscribing

smscotten’s picture

Can you clarify that this is related to the module Hierarchical Select? I'm not getting VFAS with a plain select box of a vocabulary with a hierarchy... is that enough to cause this problem?

infojunkie’s picture

@smscotten you might be experiencing an unrelated issue.

smscotten’s picture

@infojunkie I was. Loose nut behind the keyboard. Works great!

BManuel’s picture

Thanks for your wonderful modules. Any luck with support HS soon?
Thanks

unleet’s picture

subscribing

tobiberlin’s picture

Any news on this???? I experienced trouble similar with this on Views Selective Exposed Filter, described here: http://drupal.org/node/988254

okletsgo’s picture

subscribing

damiandab’s picture

subscribing

baff’s picture

subscribe

mahmost’s picture

Guys .. you can try this

$('.views-widget .selects select').change( function() {
  $(this.parentNode.parentNode.parentNode).bind('change-hierarchical-select', function() {
    $(".view-filters form").submit();
  })
});

I hope it helps

infojunkie’s picture

Status: Active » Needs review

Thanks MahmoudMostafa - can anyone confirm or infirm this approach?

mikeaja’s picture

@MahmoudMostafa, if you could explain which file and where this codes goes, that would be great. Thanks.

mahmost’s picture

To try this code, it can go in :- /sites/all/themes/[your_theme]/script.js
(uninstall the Views Filters Auto-submit module to avoid any conflict)

Drupal 6 will include the script.js file automatically when your_theme is used.

But the code needs to be put inside a behavior .. like this

Drupal.behaviors.hsAutoSubmit = function(context) {
  $('.views-widget .selects select').change(function() {
    $(this.parentNode.parentNode.parentNode).bind('change-hierarchical-select',function() {
      $('.view-filters form',context).submit();
    });
  });
}

A detailed guide can be found here

castawaybcn’s picture

I can confirm MahmoudMostafa's file works, thanks a lot for this. Just in case somebody wanted to hide the "submit/apply" button:

#edit-submit-name_of_your_view{
    display: none;
}
udane’s picture

I have the problem that is explained in #13. Any solution? Thanks.

gmaximus’s picture

@MahmoudMostafa

Hi,

I'm using Acquia Marina theme. It has this folder structure sites/all/themes/acquia_marina/js/acquia-marina-script.js. This file has code in it with the same looking syntax as your code. Sorry, your code is well outside my current knowledge. So i figured I could just add your code on the bottom and be done for now. This however didn't work, despite me checking that your code was included in the page.... Has anything changed, that you know of. Or is there good reason why my approach did not work?

Many thanks for your contribution and any words of wisdom you may have :)

Guy

gmaximus’s picture

Also tried exactly what you instructed. I also needed to add this line to the acquia_marina.info file before it would be included in the page:

scripts[] = script.js

Guy

infojunkie’s picture

Status: Needs review » Needs work

Rolling this into a patch would be greatly appreciated.

kaizerking’s picture

is this rolled in to a patch?

gmaximus’s picture

can't tell you how much i'd appreciate a patch....

puppyman’s picture

Component: Views Filters Auto-submit » General

This would be super helpful...