Merge pull request #2897 from atm-ph/fix_37_create_contact
FIX : create contact with extrafiel is null when it is require
This commit is contained in:
commit
cb0b0fba7c
@ -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"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user