handlers remote_post advanced pass custom data does not take/convert tokens

Created on 9 August 2024, 5 months ago
Updated 16 August 2024, 4 months ago

Problem/Motivation

when using a new handlers of type remote_post advanced add custom data it does not take tokens.
i use the same token values used in email handlers, so token exists.
also tried with token

test: [webform_submission:sid]

Steps to reproduce

add remote post handler
add custom data under advanced taking data from an easy token
test: [webform_submission:sid]

and a harder variant using entity reference something like
test2: [webform_submission:values:m_a_timeslot:entity:title]

this results in posted array with token names

"test": [
"webform_submission:sid"
],
"test2": [
"webform_submission:values:m_a_timeslot:entity:title"
],

Proposed resolution

look if text atria is token enabled(available tokens is listed) and i think i remember all fields in webform are suporting tokens

Remaining tasks

test and fix

User interface changes

no

API changes

no

Data model changes

no

🐛 Bug report
Status

Closed: works as designed

Version

6.3

Component

Code

Created by

🇧🇪Belgium ikeigenwijs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ikeigenwijs
  • 🇧🇪Belgium ikeigenwijs

    I currently work around it with using the token in a hidden field so the data is passed in the remote post.

  • Status changed to Closed: works as designed 4 months ago
  • 🇧🇪Belgium ikeigenwijs

    My bad,
    I started looking in the code to patch this and I saw tokens are already supported, yyeeaa!
    first twig parsing
    than token parsing

    Add custom data requires valid twig
    just put the token between "" and everything works

    "test2": "["webform_submission:values:m_a_timeslot:entity:title"]"

Production build 0.71.5 2024