Forums Forums Search & Filter Pro Prevent Range – Number from auto submit

Tagged: ,

Viewing 10 posts - 1 through 10 (of 15 total)
  • Anonymous
    #249917

    Hi,
    I’m using your plugin on a real estate page.
    As you can see here: https://www.serneholtestate.com/ I’m using the Range – Number field.

    I really need to prevent it from auto submitting before the user is done typing. It’s not working well at all, especially not on mobile. If you stop typing for a second you may end up with a max price of 30 000 instead of 300 000 which in turn clears out the other fields because there’s no properties under 30 000. So the user needs to refill the inputs again.

    I think the expected behavior would be that it updates when not focusing on / leaving the field anymore.
    I’m not using auto submit

    Can i accomplish this somehow?

    Thank you!

    Trevor
    #249923

    The only way to achieve what you want is to disable Auto Submit and have a submit button. Currently, there is not a way to do this per field or per field type, sorry. This may change in V3 (due in a few months).

    Anonymous
    #249929

    Thanks for your reply. Like I said I’m not using Auto Submit. I’m using a Submit button.

    Isn’t it these to options that makes this happen?

    Enable Auto Count

    Update the Search Form on user interaction

    Trevor
    #249936

    If Auto Submit is OFF, what you describe should not happen.

    Auto Count is different, and does not apply to Range Fields. Auto Submit is a few settings above Auto Count.

    Anonymous
    #249943

    Well, then I guess there’s a bug. This is my settings:

    Auto submitt off

    So no suggestions?

    Thanks

    Trevor
    #249950

    If I look at the the page source code, I see our form on line 106, but the body tag (the page content) does not start until line 681, meaning our form is in the head of the page? But, in the browser inspector I see it, so is it being added with JavaScript?

    For me I do not see the form auto submitting when I type in the price range field. I wonder if you are seeing a cached (in your browser cache) version of the page? You can bypass the browser cache following this guide:

    https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache

    Anonymous
    #249957

    Im so sorry, I wasn’t very clear. I meant that it auto updates the search form itself. So if you for example Choose Costa del sol > Marbella > Marbella Golden Mile and change the max price to 30000 it auto updates the search form without clicking the submit button and clears the other fields.

    Is it chosen, select2 or somewhere in your own code that triggers the auto update? I’m working as a developer myself so maybe if you point me in the right direction I can figure out how to disable update on range fields on my own?
    My client isn’t very happy that it’s not working on mobile 🙂

    I’m using the shortcode to show both the filter and the results. I’m adding the filter shortcode with an add_action function in functions.php.

    Thanks

    Trevor
    #249962

    Ah, in the screenshot you sent me, it is the second Auto Submit setting. Switch that off.

    Anonymous
    #249968

    Yes, but the thing is I want it to auto update on the other fields 🙂
    Just not when typing the price because if the user isn’t fast enough it updates the search form before finished typing. So all range fields should be exluded from the auto update.

    Trevor
    #249970

    Ah. It is either off or on for now. The sensitivity (delay before it triggers) is not something that can be changed as it is hard coded. This may change in V3 also.

Viewing 10 posts - 1 through 10 (of 15 total)