Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro auto submit delay duration

Viewing 8 posts - 1 through 8 (of 8 total)
  • Ahmed Abouelenin
    #254938

    Hi,

    I found that the below events do not work properly if I have a submit button in the form and it works fine when I remove it which I am ok with.
    $(document).on(“sf:ajaxstart”, “.searchandfilter”, function()
    $(document).on(“sf:ajaxfinish”, “.searchandfilter”, function()

    But I need to increase the delay for the autosubmit of the search box. I understand from other posts on the forum that it is fixed, so could you please let me know where is this variable in the code to increase its value or let me know if there is a better way to increase it?

    Thanks,
    Ahmed

    Trevor Moderator
    #254977
    This reply has been marked as private.
    Ahmed Abouelenin
    #255057
    This reply has been marked as private.
    Trevor Moderator
    #255062

    Your only (simple) option is to disable Auto Submit, and have the Submit button in the form.

    Ahmed Abouelenin
    #255064

    For some reason “disable Auto Submit” has the same issue plus it disable the events as well.

    Thanks,
    Ahmed

    Ross Moderator
    #255190

    Hi Ahmed

    Ajax events should work fine with or without specific fields / buttons.

    Our plugins takes over the forms .submit() and implements ajax, which is where the events are fired, regardless of what is used to get there.

    Take a look at this gif:
    https://drive.google.com/file/d/1vHCt30TAKVGcwWYYgZwGmlapiOb8FmDU/view?usp=sharing

    Anyway, if you must implement the code change, you can take a look in our JS file wp-content\plugins\search-filter-pro\public\assets\js\search-filter-build.js

    And look for the function initAutoUpdateEvents – everything is in there.

    Just to note, your site is probably calling our minified plugin file: \search-filter-pro\public\assets\js\search-filter-build.min.js – so once you’ve made your code change, minify, and update this file.

    Best

    Thanks

    Ahmed Abouelenin
    #255194

    Hi Ross,

    Thank you so much. I changed the delay in case of type=”text” in the function initAutoUpdateEvents and it is working perfectly now!

    Best regards,
    Ahmed

    Ross Moderator
    #255227

    Great stuff glad you’re setup 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘auto submit delay duration’ is closed to new replies.