Tokens in confirmation URL not rendered

Created on 28 April 2023, about 1 year ago

Hi all

Re /admin/structure/webform/manage/contact/settings/confirmation

I want to see token values (such as the page title where the webform was submitted) in the Confirmation URL so it would look something like this:

example.com/thanks?=about-us-page

Token values such as [webform_submission:values:email] work fine in my confirmation message.

But when I use the example given for the confirmation url [webform_submission:values:email:urlencode] for example the tokens are not rendered and instead the confirmation url looks like

example.com/thanks?token=lxQyRw3mMkn_Ah7jhIh8grujyIROohsMUDJkVAIqtfE

Am I doing something wrong or any ideas please for troubleshooting?

πŸ’¬ Support request
Status

Fixed

Version

6.2

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Juc1

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

Comments & Activities

  • Issue created by @Juc1
  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    I cannot reproduce this bug as written using a field called "text":

    I configured the confirmation URL as:

    https://example.com?foo=[webform_submission:values:text:urlencode]

    The redirect is to:

    https://example.com/?foo=testing&token=MXqPiNX...

    By the way in your example above there isn't a value for the query string you are adding by the way. I think you want ?email=[your token].

  • πŸ‡¬πŸ‡§United Kingdom Juc1

    By the way in your example above there isn't a name for the query string you are adding. I think you want ?email=[your token]

    @cilefen I have added the missing name for the query string and now the URL works so thanks a lot.

    The need for the name for the query string might not be obvious to everyone (such as me) so it might be good if the tooltip gave an example URL like you have given such as:

    example.com/?foo=[webform_submission:values:text:urlencode]

    Thanks for your help...

  • Status changed to Fixed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    I am glad that sorted it out.

    Query strings aren't query strings without names. That fact isn't a Webform concept and it isn't a Drupal concept, so I don't feel it is necessary to document that in the UI.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024