Currently you can chose optionally whether or not to delete a referenced piece of content when you allow referencing of existing content, but you can't do so if you don't allow referencing existing content.

I have a client with a use case where they create new content and reference it via Inline Entity Form, but they also want to be able to unlink the content and create a new piece at a later stage while retaining the original piece of content, but they never have the need to reference existing content.

It appears to me that enforcing a deletion doesn't make a lot of sense, it should always be optional, or at the least the optionality of deletion should be optional.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Deciphered’s picture

Attached patch makes the checkbox to confirm deletion available regarding of the 'Allow existing' checkbox.

jerry’s picture

Patch works fine for me, though ideally I'd like prefer for the "Delete this from the system?" checkbox to be optional (and implied) for fields that don't allow referencing existing content.

joelpittet’s picture

I've been using this for some time on one site. Nice work. Agree a bit with #2 I think but otherwise thanks @Deciphered

RAWDESK’s picture

Nice patch. Allows my customer to create new products (display nodes & commerce product entities) more rapidly without losing cloned product entities.

Chris Matthews’s picture

Status: Needs review » Reviewed & tested by the community

The 5 year old patch to entity.inline_entity_form.inc applied cleanly to the latest inline_entity_form 7.x-1.x-dev and works great for me as well so changing the status to RTBC.

  • ram4nd committed e0015cd on 7.x-1.x
    Issue #2208999 by Deciphered: Optional deletion when not allowing...
ram4nd’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.