Webform Labels and Values Tokens
This module provides tokens for webform submissions that display both the label and the value of form fields. These tokens are useful for email notifications or other integrations, especially when combined with options to exclude empty fields, preventing leftover labels without corresponding values.
Provides tokens for Webform submissions that print both labels and values, to be used in e.g. mail handlers. This module is a replacement for the [webform_submission:values:element_key:withlabel] tokens that used to exist in the Drupal 7 version of the module.
These tokens are especially useful in combination with the Exclude empty elements option, because this way both the label and value are excluded when the value is empty and you're not left with dangling labels.
Features
- Use
[webform_submission:labels_values]to output all values with their labels - Use
[webform_submission:labels_values:element_key]to output the label and value of a single element - Use
[webform_submission:labels_values:element_key,another_element_key]to output the labels and values of multiple elements - Add
:htmlto the end of the token to output the values as HTML - Add
:textto the end of the token to output the values as text
Post-Installation
Once the module is enabled you can start to use the tokens, there is no additional configuration necessary.