Skip to content
Snippets Groups Projects
Commit 0a91b6d7 authored by ANAND TIWARI's avatar ANAND TIWARI
Browse files

When making an image required and providing a default image. The system still...

When making an image required and providing a default image. The system still requires an image upload when creating content - solved by ANANDT846
parent 5397521d
No related branches found
No related tags found
1 merge request!76633083926 - required error when default image is set - error fixed by ANANDT846
This commit is part of merge request !7663. Comments created here will be created in the context of that merge request.
......@@ -201,6 +201,12 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f
];
}
foreach ($elements as $element_Index => $element) {
if (empty($element['#default_value']['fid']) && $element['#default_image']['fid']) {
$elements[$element_Index]['#default_value']['fids'][] = $element['#default_image']['fid'];
}
}
return $elements;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment