Forums Forums Search & Filter Pro Looks like Submit button isn’t working because of delay

Viewing 4 posts - 11 through 14 (of 14 total)
  • Anonymous
    #260389

    Just one more question: I work with multiple forms. I know how to add the css rules but am not sure how to add those to the script. Just like this?

    <script>(function ( $ ) {
    “use strict”;
    $(document).on(“sf:ajaxformstart”, “.searchandfilter”, function(){
    $(‘.searchandfilter[data-sf-form-id=”10574″, data-sf-form-id=”13928″] li.sf-field-submit input’).addClass(‘disabled’);
    });
    $(document).on(“sf:ajaxformfinish”, “.searchandfilter”, function(){
    $(‘.searchandfilter[data-sf-form-id=”10574″, data-sf-form-id=”13928″] li.sf-field-submit input’).removeClass(‘disabled’);
    });
    }(jQuery));</script>

    Trevor
    #260391

    You could simplify the code is you want it on all forms:

    <script>(function ( $ ) {
     "use strict";
     $(document).on("sf:ajaxformstart", ".searchandfilter", function(){
    	$('.searchandfilter li.sf-field-submit input').addClass('disabled');
     });
     $(document).on("sf:ajaxformfinish", ".searchandfilter", function(){
    	$('.searchandfilter li.sf-field-submit input').removeClass('disabled');
     });
    }(jQuery));</script>

    I think that might work. They are not on the same page, are they?

    If this works, is it OK to close this thread?

    Anonymous
    #260393

    Yes, it works. Thanks again!

    Anonymous
    #260395

    Yes, you can close this thread.

Viewing 4 posts - 11 through 14 (of 14 total)