1

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); )

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.