diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index c379d1912d1..3b5dbd664d6 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -742,7 +742,7 @@ class FormOther
if (!is_array($arrayofcolors) || count($arrayofcolors) < 1)
{
$langs->load("other");
- if (empty($conf->dol_use_jmobile))
+ if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax))
{
$out .= '';
$out .= '';
@@ -788,7 +788,7 @@ class FormOther
}
else // In most cases, this is not used. We used instead function with no specific list of colors
{
- if (empty($conf->dol_use_jmobile))
+ if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax))
{
$out .= '';
$out .= '';