'Entity Reference elements' support in composites

Created on 6 October 2021, over 3 years ago
Updated 2 February 2023, almost 2 years ago

Problem/Motivation

I'm not sure if this is in scope for this module, but right now I do not see a way to add a entity reference field in custom-defined composites. Right now, my only alternative would be to recreate the entity reference (like taxonomy terms) in a list format, which isn't ideal to keep those two lists in sync.

Steps to reproduce

@tbd

Proposed resolution

@tbd

Remaining tasks

@tbd

User interface changes

@tbd

API changes

@tbd

Data model changes

@tbd

✨ Feature request
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

    @Webbeh,

    Do you know if this is supported by the base webform's composite functionality? When the module was built, I don't think it was. I don't believe we are doing anything to prevent the use of any fields within this module, and just rely of the webform modules list of available composite sub element options, so if the base module has support it should just work here too.

    Let me know if you are able to add a entity to a composite in a form and not to one of the global composites provided by this module, and I can look more into it.

  • πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA
  • πŸ‡©πŸ‡ͺGermany J-Lee πŸ‡©πŸ‡ͺπŸ‡ͺπŸ‡Ί

    This was asked some time ago in #3214847: Allow entity references in custom composite elements β†’ .
    But I think it's a good idea to make e.g. nodes selectable for some kind of product selector or whatever.

  • πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

    Hi @j-lee,

    I definately agree that this is a good feature to support, but it relies on the functionality being supported by Webform, so we'll need to get the issue fixed there first then ensure that this module fully supports it. @jrockowitz worked on this in #3214847: Allow entity references in custom composite elements β†’ . There is a PR there which partially implements this. If this feature is required, we should work on getting that pr finished.

    I'm here with him at the Drupal NYC Contribution Day, and the general sentiment i that the feature opens a lot of questions and will include a lot of complexity for handling the saving, display, and rendering of the entity reference values, which introduces a lot of complexity and will call a lot of development. This can also be implemented via a custom composite class if its really needed.

Production build 0.71.5 2024