Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- I try to get Key of a list(text) field in code field (Display Suite) but I get only option labels
- What about suffix and prefixes, token returns value without them
Comments
Comment #0.0
Jarviss CreditAttribution: Jarviss commentedadd
Comment #1
ultrabob CreditAttribution: ultrabob commentedI'm also trying to figure out how to get the key for a list field with tokens. Is this possible?
Comment #2
silverham CreditAttribution: silverham at EY Digital commentedUsing the token: (where field_myfield is a taxonomy field), seems to work on Drupal 9
[node:field_myfield:entity:field_list:value]