Add support for [current-page:post:*].

Created on 8 June 2021, over 3 years ago
Updated 18 July 2023, over 1 year ago

Problem/Motivation

Site builders would like to pass POST values to a webform using tokens like [current-page:post:email]

Steps to reproduce

Proposed resolution

Add support for [current-page:post:*].

Remaining tasks

  • Write patch
  • Decide if feature should be added
  • Review patch
  • Add test coverage
  • Commit patch

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MariaDB 10.3.22
    last update over 1 year ago
    77 pass
  • πŸ‡¬πŸ‡§United Kingdom sergiur London, UK

    I'm not sure how the dynamic tokens are supposed to work, but if there are no post values matched, the token itself prints as a string inside the webform field e.g. [current-page:post:email].

    This patch makes a simple change to print an empty string if the POST value doesn't exist, as seeing the token itself is not useful. I see the same happens for the "query" dynamic token, which is also arguably not expected behaviour for users. Thoughts?

Production build 0.71.5 2024