diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1666901d04a..06fd6cc02e8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1878,6 +1878,15 @@ class Form $price_level = (! empty($price_level) ? $price_level : 0); if (is_null($ajaxoptions)) $ajaxoptions=array(); + if(strval($filtertype) === '' && (!empty($conf->product->enabled) || !empty($conf->service->enabled))){ + if(!empty($conf->product->enabled) && empty($conf->service->enabled)){ + $filtertype = '0'; + } + elseif(empty($conf->product->enabled) && !empty($conf->service->enabled)){ + $filtertype = '1'; + } + } + if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) { $placeholder='';