I would like to output a submitted value as a token on the confirmation page through the twig. The token works just fine when added into the message box of webform as:
[webform_submission:values:score_percentage]
But I can’t seem to get the same value to output through the twig. I have tried:
{{ webform_token('webform_submission:values:score_percentage') }}
{{ webform_token('[webform_submission:values:score_percentage]') }}
{{ drupal_token('webform_submission:values:score_percentage') }}
{{ drupal_token('[webform_submission:values:score_percentage]') }}
But they all just print the token itself, like:
webform_submission:values:score_percentage
[webform_submission:values:score_percentage]
[webform_submission:values:score_percentage]
[[webform_submission:values:score_percentage]]
As well as this old issue, which by the looks of it would be fixed now.
I have the latest versions of Twig Tweak (8.x-2.9) and Token (8.x-1.9) installed. Am I doing something fundamentally wrong here?