Commit 28d43ae1 authored by fago's avatar fago
Browse files

Issue #1545584 by blueminds | tyx: Fixed Problem when using Image field with field collection.

parent 482d0d31
......@@ -1321,6 +1321,10 @@ function field_collection_field_widget_embed_validate($element, &$form_state, $c
field_attach_submit('field_collection_item', $field_collection_item, $element, $form_state);
// Load initial form values into $item, so any other form values below the
// same parents are kept.
$item = drupal_array_get_nested_value($form_state['values'], $element['#parents']);
// Set the _weight if it is a multiple field.
if (isset($element['_weight']) && ($field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED)) {
$item['_weight'] = $element['_weight']['#value'];
......
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