diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 248352dfee3..3b9a9948889 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -200,8 +200,12 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); - if ($ret < 0) $error++; - + if ($ret < 0) + { + $error++; + $action = 'create'; + } + if (! GETPOST("lastname")) { $error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));