diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 305a34d5036..d5a2fa1aae7 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6552,7 +6552,7 @@ class Form
templateResult: formatResult, /* For 4.0 */
// Specify format function for selected item
formatSelection: formatSelection,
- templateResult: formatSelection /* For 4.0 */
+ templateSelection: formatSelection /* For 4.0 */
});
});'."\n";
}