Problem/Motivation

In webform, we're using a "TERM SELECT" element to draw select options from taxonomy.

When we map this in -->

/admin/structure/salesforce/mappings/manage/_mapping_name_/fields

And then submit the webform, the TERM ID (a number) not the NAME of the Term gets submitted.

How can I send the term name? instead of the ID?

Comments

alphex created an issue.

mrshowerman’s picture

I have the same issue, not just with taxonomy terms. Seems to apply to all entity reference fields.

aaronbauman’s picture

what type of mapping field are you using? have you tried using a token field?

mrshowerman’s picture

I was using a Webform elements mapping field.
I now gave it a try with a Token field using the token [webform_submission:values:<field_name>:entity:title], and it worked!

Doesn't feel quite intuitive, though.
Any chance the Webform elements mapping field can be tweaked to use the referenced entity's label? It really doesn't make sense to send Drupal entity IDs to Salesforce.

aaronbauman’s picture

I don't use the webform mapping submodule much, but patches are welcome if you'd like to extend this behavior.