I need to get the key of the key|value pair from a text list field in a token.
Say the field configuration shows the following options:
no|No Way Jose! yes|Why yes, that'd do nicely!
and the field is named
the token [node:field_doc_textlist] is returning a value like 'No Way Jose!' when what I want is 'no'. Is there a way to get that from tokens. I'm using this in the filefield paths module if that matters.
I saw other similar answers here, with no real answers, but I've tried [node:field_doc_textlist:key] [node:field-doc-textlist] [node:field_doc_textlist:machine_name] [node:field_doc_textlist:machine-name] all to no avail
Some additional information: All of the above result in an error similar to
The File path is using the following invalid tokens: [node:field-doc-type-book].
A lot of the information I've found suggests using the hyphenated version of the token name instead of the underscore version, but that seems not to work at all.