Merge pull request #18148 from AlexisLaurier/fix/CommonObjectShowInputFieldCheckboxAndRadio

fix showInputField checkbox and radio type
This commit is contained in:
Laurent Destailleur 2021-07-14 13:55:53 +02:00 committed by GitHub
commit 7281a51eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5917,7 +5917,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'];