diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 2b5ba7e282d..5a4d19f93c9 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -654,7 +654,7 @@ class FormCompany { global $conf,$langs; - $formlength=24; + $formlength=0; if ($country_code == 'FR' && empty($conf->global->MAIN_DISABLEPROFIDRULES)) { if ($idprof==1) $formlength=9; @@ -676,7 +676,10 @@ class FormCompany if (! $selected && $idprof==3) $selected=$this->ape; if (! $selected && $idprof==4) $selected=$this->idprof4; - $out = ''; + $maxlength=$formlength; + if (empty($formlength)) { $formlength=24; $maxlength=32; } + + $out = ''; return $out; }