Forums › Forums › Search & Filter Pro › Prevent Range – Number from auto submit
Tagged: range - number, V3
- This topic has 14 replies, 3 voices, and was last updated 4 years, 4 months ago by Ross.
-
Anonymous(Private) June 24, 2020 at 3:26 pm #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 submitCan i accomplish this somehow?
Thank you!
Trevor(Private) June 24, 2020 at 4:34 pm #249950If 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:
Anonymous(Private) June 24, 2020 at 5:05 pm #249957Im 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
Anonymous(Private) June 24, 2020 at 5:22 pm #249968Yes, 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. -
AuthorPosts