mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
change
This commit is contained in:
@@ -7117,16 +7117,9 @@ abstract class CommonObject
|
||||
{
|
||||
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)) : $this->array_options['options_'.$key];
|
||||
}
|
||||
|
||||
// HTML and text add default value
|
||||
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text')))
|
||||
{
|
||||
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')))
|
||||
|
||||
// HTML, select, integer and text add default value
|
||||
if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'select', 'int')))
|
||||
{
|
||||
if($action=='create') $value = $extrafields->attributes[$this->table_element]['default'][$key];
|
||||
else $value = $this->array_options['options_'.$key];
|
||||
|
||||
Reference in New Issue
Block a user