diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 393560b4640..2198cd9df13 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -76,7 +76,7 @@ class Form
* @param string $htmlname Name of select field ('edit' prefix will be added)
* @param string $preselected Name of Value to show/edit (not used in this function)
* @param object $object Object
- * @param boolean $perm Permission to allow button to edit parameter
+ * @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
* @param string $moreparam More param to add on a href URL
* @return string HTML edit field
@@ -104,11 +104,11 @@ class Form
}
else
{
- $ret.='
| ';
+ if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='';
+ if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=' |
';
}
return $ret;