From 4f7be362496bcb3de295a9dcd1ae11ef1dde6446 Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Wed, 7 Nov 2018 09:14:29 +0100 Subject: [PATCH] fix extrafield hidden --- htdocs/core/class/commonobject.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 88386521079..67e06ea59f3 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6142,7 +6142,7 @@ abstract class CommonObject if (! is_object($form)) $form=new Form($db); $out = ''; - + if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) { $out .= "\n"; @@ -6152,6 +6152,10 @@ abstract class CommonObject $e = 0; foreach($extrafields->attributes[$this->table_element]['label'] as $key=>$label) { + if(empty($extrafields->attribute_list[$key]) && $mode == 'view'){ + continue; + } + $enabled = 1; if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key])) {