Browse Source

Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0

Laurent Destailleur 4 years ago
parent
commit
dd70bee773
1 changed files with 7 additions and 1 deletions
  1. 7 1
      htdocs/fichinter/card.php

+ 7 - 1
htdocs/fichinter/card.php

@@ -260,7 +260,13 @@ if (empty($reshook))
 				}
 
 				// Extrafields
-				$extrafields = new ExtraFields($db);
+
+				// Fill array 'array_options' with data from add form
+				$ret = $extrafields->setOptionalsFromPost(null, $object);
+				if ($ret < 0) {
+					$error++;
+					$action = 'create';
+				}
 				$array_options = $extrafields->getOptionalsFromPost($object->table_element);
 
 		        $object->array_options = $array_options;