From cd5e1d603e8dc26e312dc1d186298749537a847f Mon Sep 17 00:00:00 2001 From: Alexis LAURIER Date: Wed, 14 Jul 2021 12:02:03 +0200 Subject: [PATCH] fix showInputField checkbox and radio type --- htdocs/core/class/commonobject.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9e6204bd364..a726987c607 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5898,7 +5898,10 @@ abstract class CommonObject $type = 'varchar'; } elseif (is_array($this->fields[$key]['arrayofkeyval'])) { $param['options'] = $this->fields[$key]['arrayofkeyval']; - $type = 'select'; + $type = $this->fields[$key]['type']; + if(!in_array($type, array('select', 'checkbox', 'radio'))) { + $type = 'select'; + } } else { $param['options'] = array(); $type = $this->fields[$key]['type'];