Update commonobject.class.php

This commit is contained in:
Matt Sidnell 2020-04-20 22:52:36 +01:00
parent ea9f0097a2
commit 59b574742b

View File

@ -7124,7 +7124,14 @@ abstract class CommonObject
if($action=='create') $value = $extrafields->attributes[$this->table_element]['default'][$key];
else $value = $this->array_options['options_'.$key];
}
// select fields use default value
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('select')))
{
if($action=='create') $value = $extrafields->attributes[$this->table_element]['default'][$key];
else $value = $this->array_options['options_'.$key];
}
$labeltoshow = $langs->trans($label);
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);