Allow to use rendered entities (in selected view mode) as webform entity checkboxes / radios options

Created on 20 August 2024, about 1 year ago

Problem/Motivation

Webform provides several entity reference selection elements like:

  • webform_entity_checkboxes
  • webform_entity_radios

for example.

For our use-case, we'd like to show the rendered entities instead of their label in a certain view mode ("card").

I neither could find a setting for that nor a contrib module solving that.

Modules like

allow rendering a selected entity in a webform, but not as checkboxes / radios values.

The rendering should happen in the form, not in the submissions display.

Am I missing something or isn't this feature existing yet?

(Of course, this is not a request for the maintainer to implement this, but to ask if this feature would be accepted by the maintainer and to ensure it's not already solved somewhere and I didn't find it.)

Thank you!

Steps to reproduce

Add an entity reference webform element to the webform like Entity radios or Entity checkboxes and try to render the referenced entity instead of the label as options.

Proposed resolution

  1. Provide a setting to select if the label or the rendered entity (in a selected view mode) should be used as options
  2. Render the entity as options in the selected view mode, if that option is chosen

Remaining tasks

  1. Ensure the feature doesn't already exist
  2. Get green light from maintainer
  3. Implement
  4. Test
  5. Release

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

6.3

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024