Problem/Motivation

If you create a composite element using a webform_entity_select or term select it works fine but if you view the submission results. It shows the taxonomy term id instead of the label. I tried to adjust the output in the webform settings but it didn't do anything. You have to edit the submission to see what the taxonomy term names are.

Adding an entity select element via the interface shows the label in the results as you would expect.

Comments

cman9090 created an issue. See original summary.

cman9090’s picture

Issue summary: View changes
jrockowitz’s picture

I think you may need to override WebformCompositeBase::formatTableColumn and add a custom #format property to your entity reference element.

BTW, I just found this bug. #2883192: Composite sub element not displaying when view submissions.

cman9090’s picture

Would you recommend making my own copy of WebformCompositeBase or is there a better way to override?

jrockowitz’s picture

To create a custom composite element, you have to extend WebformCompositeBase. (ie MyComposite extend WebformCompositeBase)

@see https://stackoverflow.com/questions/2994758/what-is-function-overloading...

jrockowitz’s picture

Status: Active » Closed (works as designed)
cman9090’s picture

Status: Closed (works as designed) » Active

I think this needs to be reopened. If you use an email handler with the composite field I have setup, it also sends through taxonomy ids instead of labels. I don't think anybody would be expecting to see taxonomy ids anywhere but labels. Considering that when you select taxonomy terms with dedicated taxonomy term elements and it outputs labels why would someone expect it to be different within a composite field?

jrockowitz’s picture

cman9090’s picture

Legend :)

jrockowitz’s picture

Status: Active » Fixed

This issue has been fixed. Please download the latest dev release to review.

Status: Fixed » Closed (fixed)

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