Ajouter un commentaire

Soumis par Frederick J. H… (non vérifié) le 10/05/2017 à 16:08 - Permalien

Hi!
Thanks for the write up! I thought that this should work for what I am doing. In my Webform the user can select an entity (via entity reference). The referenced entities have a field with an email address. This email address should be the "To:" email address that the webform submission gets sent too.

Here is the Webform token info for submission values:

[webform_submission:values:?]
Webform tokens from submitted data. Replace the '?' with the 'element_key', 'element_key:format' or 'element_key:format:items'. The 'format' can be 'value', 'raw', or custom format specifically associated with the element The 'items' can be 'comma', 'semicolon', 'and', 'ol', 'ul', or custom delimiter For example, to display the Contact webform's 'Subject' element's value you would use the [webform_submission:values:subject] token.

My email field on the reference entities has a machine name of: field_email, so I figure this would be the token:

[webform_submission:values:contact_reason_or_person:entity:field_email]

Web form displays the following in the Webform email To field:
To: [contact_reason_or_person]

I have tried a number of :entity chained tokens and all of them give the same results. I tried the token:
[webform_submission:values:contact_reason_or_person:entity:title]
which I figured all entities should have but it too showed up as:
To: [contact_reason_or_person]

Thanks again for the blog post and in advance for any assistance you can offer!
Frederick