diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 450ed7364ca..cd808157045 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6191,12 +6191,6 @@ class Form $resql = $this->db->query($sql); if ($resql) { - if (!$forcecombo) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $out .= ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode); - } - // Construct $out and $outarray $out .= ''."\n"; + + if (!$forcecombo) + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode); + } } else {