Last active
August 29, 2015 13:57
-
-
Save patches-76431/9604486 to your computer and use it in GitHub Desktop.
Fixes attach_form for field_collections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/field_collection.module b/field_collection.module | |
| index 3a08d04..a6af5de 100644 | |
| --- a/field_collection.module | |
| +++ b/field_collection.module | |
| @@ -1256,7 +1256,7 @@ function field_collection_field_attach_form($entity_type, $entity, &$form, &$for | |
| if ($field_info['type'] == 'field_collection' && $field_settings['hide_blank_items'] | |
| && field_access('edit', $field_info, $entity_type) | |
| && $form_state['field'][$field_name][$lang]['instance']['widget']['type'] != 'field_collection_hidden' | |
| - && $form[$field_name][$lang]['#max_delta'] >= 0) { | |
| + && $form[$field_name][$lang]['#max_delta'] > 0) { | |
| // Check for hide blank item(s) exceptions. | |
| $exceptions = array_filter($field_settings['hide_blank_items_exceptions']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment