0

I'm trying to use the [current-page:url] token in a webform hidden field (as the default value) but the submission shows "[current-page:url]" literally. Am I missing something?

3
  • Drupal version ? Commented Feb 14, 2019 at 14:08
  • Can you please add screenshot of hidden field setting. Commented Feb 14, 2019 at 14:11
  • the better way to deal with this situation is to use hook_form_alter() api.drupal.org/api/drupal/…
    – MiharbKH
    Commented Feb 14, 2019 at 14:55

1 Answer 1

1

token is a contributed module and not part of Drupal 8 or webform installation. You have to install and enable before you can use it.

composer require drupal/token
drush en token

NOTE: Webform is not aware of token directly and does not complain because it thinks are you just inputting text

1
  • I can confirm that the [current-page] token is being provided by the token.module.
    – jrockowitz
    Commented Feb 14, 2019 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.