diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index c89851fe1b7..9a6ae3661dc 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2462,6 +2462,7 @@ class Form
{
// phpcs:enable
global $langs, $conf;
+ global $hookmanager;
$out = '';
$outarray = array();