Title: Filtering without submit button?
Last modified: August 21, 2016

---

# Filtering without submit button?

 *  Resolved [CroiSciento](https://wordpress.org/support/users/croisciento/)
 * (@croisciento)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/)
 * Hello,
 * This plugin is really good so far, but I was wondering if there was a way to 
   filter each post, each time we are checking a checkbox or selecting a term in
   the dropdown. Is it possible?
 * I’ve tried in the first place to do it myself in Php with the sessions but I 
   had some troubles with the paginations and some other stuff so I’m looking for
   a while something like this :
 * [http://codecanyon.net/item/taxonomies-filter-widget/full_screen_preview/4282257](http://codecanyon.net/item/taxonomies-filter-widget/full_screen_preview/4282257)
 * Except that this plugin isn’t free, and I didn’t find a correct tutorial to achieve
   my goal.
 * Thanks for your time.
 * [https://wordpress.org/plugins/search-filter/](https://wordpress.org/plugins/search-filter/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4932875)
 * Hey CrioSciento, did you check out the pro version of our plugin yet?
 * [http://demo.designsandcode.com/searchandfilterpro/product-search/](http://demo.designsandcode.com/searchandfilterpro/product-search/)
 * This does exactly what you need…
 * Also see this forum post, maybe you don’t need Ajax and are happy with a page
   refresh 🙂
 * [http://wordpress.org/support/topic/auto-submit-on-select?replies=4](http://wordpress.org/support/topic/auto-submit-on-select?replies=4)
 *  Thread Starter [CroiSciento](https://wordpress.org/support/users/croisciento/)
 * (@croisciento)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4932890)
 * Thanks this is working.
 * One last thing, is it possible to apply a css on all parent terms/child terms?
   So even If I add new terms they’ll be automatically stylized.
 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4932910)
 * Yeah you can…
 * Depends on what you are using
 * If you are using checkboxes/radio then children are wrapped in a `UL` so you 
   would do something like:
 *     ```
       .searchandfilter ul li ul li
       {
           /* these are child list items */
           background-color:#cc0000;
       }
       ```
   
 * If you are using select/multiselect, there are `depth` classes added to each 
   option to determine if an item is a child ,so you should be able to target these(
   something like “depth-1”, “depth-2” etc, depending on hierarchy structure).
 *  Thread Starter [CroiSciento](https://wordpress.org/support/users/croisciento/)
 * (@croisciento)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4932924)
 * Okay thanks. 🙂
 *  [cambridgesca](https://wordpress.org/support/users/cambridgesca/)
 * (@cambridgesca)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4933045)
 * Seeing as this post is so recent and I’m aiming to achieve the same thing, forgive
   me for kidnapping the thread.
 * I’ve created a child theme to allow for customisation of taxonomies. This is 
   working great.
    I’ve added a enqueue_script into my functions.php in the child
   theme to call for the JS outlined above:
 *     ```
       // Refresh the search in directory after picking one of the criteria
   
       if ( !is_admin() ) { // instruction to only load if it is not the admin area
          // register your script location, dependencies and version
       	wp_register_script('refresh_script', get_stylesheet_directory_uri() . 'js/refresh.js', array('jquery'), true );
   
          // enqueue the script
          wp_enqueue_script('refresh_script');
       }
       ```
   
 * my refresh.js file code is as follows:
 *     ```
       $(".searchandfilter select").change(function() {
          $(".searchandfilter").submit();
       });
       ```
   
 * The website I’m trying to implement it on is [http://www.cambridgesca.org.uk/ExternalDirectory/searchdirectory/](http://www.cambridgesca.org.uk/ExternalDirectory/searchdirectory/)
   
   Sometimes, when I’m switching between the items on the drop-down list, it looks
   like there’s some activity on the windows-program-bar (not sure what its official
   name is!); like there was a pop-up new window trying to come up.
 * I would appreciate if you could point me in the right direction to achieving 
   multi-criteria search as demonstrated in the add-on that the OP linked.
    We are
   a charity, so if we can get away without paying for add-ons, it would be wonderful.
 * On a side-note, today (it’s something I’ve been fighting with yesterday), when
   I’m trying to open/edit refresh.js through FTP, I get error that says Object 
   Expected, 800A138F, Microsoft JScript runtime error.
    I had another look on your
   pro-version demo site just now, and on the side bar I get the following error:
 * > Fatal error: Call to undefined function array_replace() in /var/sites/d/demo.
   > designsandcode.com/public_html/searchandfilterpro/wp-content/plugins/search-
   > filter-pro/public/includes/class-search-filter-display-shortcode.php on line
   > 411
 * I did an Adobe Flash Player update this morning – can the errors be related to
   that…?
 * Thank you for your time
 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4933087)
 * Hey cambridgesca, this is a problem I discovered not so long ago with PHP 5.3
   users and below… basically there is a function that does not exist…
 * Add this to your functions.php file and it should work –
 *     ```
       if (!function_exists('array_replace'))
       {
       	function array_replace()
       	{
       		$array=array();
       		$n=func_num_args();
       		while ($n-- >0)
       		{
       			$array+=func_get_arg($n);
       		}
       		return $array;
       	}
       }
       ```
   
 * I will include this in the next update

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Filtering without submit button?’ is closed to new replies.

 * ![](https://ps.w.org/search-filter/assets/icon-256x256.png?rev=3096093)
 * [Search & Filter](https://wordpress.org/plugins/search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-filter/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/filtering-without-submit-button/#post-4933087)
 * Status: resolved