Fix default value for boolean extrafield
This commit is contained in:
parent
1196d6f48c
commit
4932f86a2d
@ -7518,7 +7518,7 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
// HTML, text, select, integer and varchar: take into account default value in database if in create mode
|
||||
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int'))) {
|
||||
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int', 'boolean'))) {
|
||||
if ($action == 'create') {
|
||||
$value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) || $value) ? $value : $extrafields->attributes[$this->table_element]['default'][$key];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user