I'm using Drupal 8 together with the Webform module.
Is there a way to transfer the value of a field in a specific content type to a webform?
This is the situation:
There's a content type called 'Vacature' where you create the specific content (vacancies).
When adding a new vacancy I provide a field called 'vacaturecode' and a dropdown where you select the application webform that will be used to apply for the vacancy.
The application webform collects all the data of the applicant including two uploads (CV and motivation letter).
For these two upload fields I use the property 'File name pattern' to rename the original uploaded document to 00_lastname_CV_vacaturecode.pdf
upon submission.
Therefore I use a string of tokens in the 'File name pattern' property:
[webform_submission:serial]_[webform_submission:values:lastname]_CV_[webform_submission:node:field_vacaturecode:value]
This works, only I don't get to add the value of the field 'vacaturecode' that is submitted when creating the content. Instead the syntax is added as value.
I already tried various combinations of the syntax (e.g. [webform_submission:source-entity:entity:field_vacaturecode:value]
) but I don't get it right.
Is there a way to address this value from within the webform?
Thanks for you help!