Format for webform submission node tokens?
Question
I have a field on my webform node which is an entity reference to a taxonomy term. I'm printing it in the webform using the token [webform_submission:node:field_sports]
, which prints the field output, but formatted as a link to the term page, whereas what I want is plain text. For webform submission values, there is the :raw format, but trying to use this with the node field token results in the error "Computed value/markup is using the following invalid tokens: [webform_submission:node:field_sports:raw]."
This token does not seem to respect the display settings on the content type, either; removing the link there does nothing for the display on the webform.
Solution
If you use [webform_submission:node:field_sports:0:entity]
you can get field values form the taxonomy term.
So to get the name, you can use:
[webform_submission:node:field_sports:0:entity:name]