When there is only 1 field collection item is not necesary to show "Remove" button, that button should appear only if there is 2 or more field collection items...

for ux reasons is not logic have a "Remove" button if the item is still gonna be there. if you click the button the item stays there...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmuzz’s picture

Issue tags: -remove button, -Field collection, -#ux

It should be there as long as there is data in the field collection item's fields. I agree it isn't necessary if the field collection item is blank as nothing will be saved and there is nothing to remove.

ssoulless’s picture

Issue summary: View changes
vivekguptakota’s picture

Status: Active » Needs review
FileSize
267 bytes

You can apply following patch
field_collection/field_collection.module
Line no 1421
-- if ($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED) {
++ if ($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED && $field_state['items_count']>1) {

Add one more condition with items_count.After made this change remove button will not show when only one item present in field collection

Chris Matthews’s picture

Status: Needs review » Needs work

@vivekguptakota, can you upload a .patch file against the latest 7.x-1.x-dev?