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?
1 Answer
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
-
I can confirm that the [current-page] token is being provided by the token.module. Commented Feb 14, 2019 at 18:24
hook_form_alter()
api.drupal.org/api/drupal/…