Forums › Forums › Search & Filter Pro › Disabling features if form is on a certain url (disable features in some instanc
- This topic has 2 replies, 2 voices, and was last updated 4 years, 10 months ago by Ross.
-
Anonymous(Private) January 3, 2020 at 5:01 pm #230205
Hi there,
I wonder if there is a way to disable the update form when changes are made, if the form is on a certain url.
I basically need to disable a feature when a form is accessed from the home page.
Essentially I would like two sepperate forms for woocommerce. one that aut updates and one that doesn’t.
I’m using css to hide and show fields on each form.
Any advice would be great, as i don’t want to use another plugin for the seperate search.
Kind regards,
Dave
Anonymous(Private) January 3, 2020 at 7:48 pm #230208Hi there,
I have managed to solve my issue by adding the below around line
1876 of main js file.if( jQuery( “body” ).hasClass( “sf-field-search-open-body” ) ) {}else{
return 1 == e.auto_update ? e.submitForm() : 0 == e.auto_update && 1 == e.auto_count_refresh_mode && e.formUpdatedFetchAjax(), !1
}If you have any better suggestions please let me know.
Kind regards,
Dave
Ross Moderator(Private) January 6, 2020 at 11:12 am #230235Hi David
Some of the features of our search forms are passed via html attributes to our search form from PHP.
So you might be able to use a filter to achieve what you need (I think this question was answered in the past):
https://support.searchandfilter.com/forums/topic/overriding-the-auto-submit-form-for-selected-pages/#post-183617So I guess you would do some conditional to check if
is_home()
and then make your modifications there.Let me know if that works for you
Thanks
-
AuthorPosts