Commit 96eff7c2 authored by Tim Plunkett's avatar Tim Plunkett
Browse files

Issue #1329856 by blainelang, Morpheus80ta, jec006, serbanbjd: Only run...

Issue #1329856 by blainelang, Morpheus80ta, jec006, serbanbjd: Only run validation when the form is actually submitted.
parent 10c6574e
......@@ -1273,7 +1273,7 @@ function field_collection_field_widget_embed_validate($element, &$form_state, $c
// Only if the form is being submitted, finish the collection entity and
// prepare it for saving.
if ($form_state['submitted'] && !form_get_errors()) {
if ($form_state['submitted'] && !form_get_errors() && $form_state['clicked_button']['#name'] == 'op') {
field_attach_submit('field_collection_item', $field_collection_item, $element, $form_state);
......
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