Closed (fixed)
Project:
Drupal core
Version:
8.6.16
Component:
entity_reference.module
Priority:
Normal
Category:
Support request
Assigned:
Issue tags:
Reporter:
Created:
4 Jun 2019 at 05:23 UTC
Updated:
11 Dec 2019 at 13:44 UTC
Jump to comment: Most recent
Comments
Comment #2
kenton.r commentedComment #3
kenton.r commentedI found this post:
https://drupal.stackexchange.com/questions/249618/how-to-prevent-duplica...
I implemented it as a form_alter and it works.
Could we get the autocomplete widget patched with this solution?
Comment #4
navkaur commentedComment #5
joey-santiago commentedStarting working on this @Drupal South.
Comment #6
joey-santiago commentedSpent some time on this and actually it seems to me that the reference is not added multiple times for the same entity, so i guess the idea should be to filter out the already referenced entity from the autocomplete results?
Comment #7
amateescu commentedThere's a contrib module which covers this functionality: https://www.drupal.org/project/entity_reference_validators