diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e71a0f6eafe..f31cb0f741e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -688,8 +688,21 @@ class Form if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && ! $forcecombo) { //$minLength = (is_numeric($conf->global->COMPANY_USE_SEARCH_TO_SELECT)?$conf->global->COMPANY_USE_SEARCH_TO_SELECT:2); - - $out.= ajax_combobox($htmlname, $event); + $out.= ajax_combobox($htmlname, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT); + /* + if ($selected && empty($selected_input_value)) + { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + $product = new Product($this->db); + $product->fetch($selected); + $selected_input_value=$product->ref; + } + // mode=1 means customers products + $ajaxoptions=array(); + $urloption='htmlname='.$htmlname.'&outjson=1&filter='.urlencode($filter).'&showtype='.$showtype; + $out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); + $out.=''; + */ } $out.= '