I'm building a custom block that shows Hierarchical select form , I'm trying to autosubmit it after make a selection I'm using this code :
(function ($) {
Drupal.behaviors.exampleModule = {
attach: function (context, settings) {
$(".hierarchical-select-wrapper").bind("change-hierarchical-select",function(){
console.log("Yes changed hierarchical-select");
jQuery("#location-selector-form").submit();
//$("#location-selector-form .form-submit").trigger("click");
})
}
};
})(jQuery);
My form is autosubmited but with no values (I checked this with dpm($form_state);
)