Commit 96572e83 authored by fago's avatar fago
Browse files

Follow-up for Issue #1239946: Avoid empty div to appear when adding a new...

 Follow-up for Issue #1239946: Avoid empty div to appear when adding a new item using the embedded widget and a field collection field is required.
parent c6ccef7d
......@@ -1139,7 +1139,7 @@ function field_collection_field_attach_form($entity_type, $entity, &$form, &$for
if ($field['type'] == 'field_collection' && $field['settings']['hide_blank_items']
&& field_access('edit', $field, $entity_type)
&& $instance['widget']['type'] == 'field_collection_embed'
&& $form[$field_name][$langcode]['#max_delta'] > 1) {
&& $form[$field_name][$langcode]['#max_delta'] > 0) {
$form[$field_name][$langcode]['#max_delta']--;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment