Problem/Motivation
This module is great for adding an inline workflow for referenced entities! The only thing it is missing (and a current problem I have) is being able to add duplicate references. So I have a need to reference an existing entity more than once. This is kind of awkward to override from outside of IEF.
Proposed resolution
Add a field instance setting to 'allow duplicates'. This can be opt-in only so the current behaviour remains unchanged. This just needs to be checked in a couple of places for this to work properly - When showing referenced entities in the IEF field widget form, and when validating the widget form (inline_entity_form_reference_form_validate).
Remaining tasks
User interface changes
One new option when creating a field instance.
API changes
Comment | File | Size | Author |
---|---|---|---|
#6 | inline_entity_form-allow_duplicate_references-2376679-6.patch | 5.02 KB | ndewhurst |
#2 | inline_entity_form-allow_duplicate_references-2376679-2.patch | 5.02 KB | ndewhurst |
#1 | 2376679.patch | 3.54 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedComment #2
ndewhurst@damiankloip, thanks! I was looking for exactly the same functionality, and I almost submitted a separate issue/patch before finding this.
I updated your patch to work with the latest module code and made a few tweaks:
allow_duplicates
setting instead of thedelete_references
setting.This is working well for me. I'm tempted to RTBC this, but it would be good to get more testing/corroboration.
Comment #3
ndewhurstComment #6
ndewhurstRemoving newer array syntax.