In content editing when a field collection field cardinality is set to a value different than unlimited then allow users to empty it.

Comments

drikc’s picture

Status: Active » Needs review
StatusFileSize
new2.81 KB
drikc’s picture

StatusFileSize
new2.36 KB

Clean the above patch; remove trailing white spaces.

tim.plunkett’s picture

How is this better than the 'delete' functionality that was added recently?

drikc’s picture

The 'delete' functionality is only available when cardinality is set to unlimited.

An 'empty' button can empty embedded fields set as required of a host field-collection field set as unrequired (which cardinality is different than unlimited). In that context it mean that a user which fill those embedded required fields is steel able to empty the host field-collection which should be possible as it is set to unrequired.

torotil’s picture

I think this problem has been solved more generally with the "hide empty items" option in the field configuration.

joshahubbers’s picture

Issue summary: View changes
StatusFileSize
new2.9 KB

I reopen this issue. Problem is that when you do not have "unlimited" selected, the option "hide empty items" does not do anything.

Added a new patch because the existing patch did not work properly in my installation.