';
// Contact
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 78b00be8531..7826d346b15 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -526,7 +526,7 @@ class Form
* \param showtype Show third party type in combolist (customer, prospect or supplier)
* \param forcecombo Force to use combo box
*/
- function select_societes($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0)
+ function select_societes($selected='',$htmlname='company',$filter='',$showempty=0, $showtype=0, $forcecombo=0)
{
global $conf,$user,$langs;
@@ -570,7 +570,7 @@ class Form
{
print '';
}
- print ajax_autocompleter(($socid?$socid:-1),$htmlname,DOL_URL_ROOT.'/societe/ajaxcompanies.php?filter='.urlencode($filter), '');
+ print ajax_autocompleter(($socid?$socid:-1),$htmlname,'socid',DOL_URL_ROOT.'/societe/ajaxcompanies.php?filter='.urlencode($filter), '');
print '';
print '
';
print ajax_indicator($htmlname,'working'); // Indicator is here
diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php
index dc43892c603..aab917e96e2 100644
--- a/htdocs/lib/ajax.lib.php
+++ b/htdocs/lib/ajax.lib.php
@@ -81,14 +81,25 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
* \param indicator nom de l'image gif sans l'extension
* \return string script complet
*/
-function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
+function ajax_autocompleter($selected='',$htmlname,$value,$url,$indicator='working')
{
$script='';
- $script.= '';
+ $script.= '';
$script.= '';
$script.= '';
return $script;