On node/[nid]/webform/emails/[email-id], it's possible to use %email[key] and %value[key], but there's no-where where it's possible to see a list of all the configured components' keys. This would be very useful, especially for complex webforms with lots of components and fieldsets, where it's difficult to remember your naming scheme.

The best spot for such a list that I can think of is the pre-existing "Included e-mail values" table at the bottom of the page - the keys could be added to this as another column fairly easily. However, there might be a better spot, since such a list would also be useful for the webform_php.module tab (obviously the main component list is a bit cluttered already, maybe this list could just be added to the PHP processing tab as well?)

The list format would preferably be in the form [fieldset(s)][key] (then it can just be copied-and-pasted and prefixed with %email or %value, or even $form_values['submitted_tree'], with a bit of modification).

CommentFileSizeAuthor
#4 Node-Naming-Tokens.png6.38 KBOliver71
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Title: List component keys for reference. » Expand token list for [submission:values:x] in token browser
Version: 6.x-3.x-dev » 7.x-4.x-dev

Though this feature request is very old, it still applies to the current 7.x-4.x version of the module. We now use the D7 Token module and its token-browser dialog for showing tokens, but we don't have a browser for individual Webform nodes yet because we don't have any contextual information when the token browser is opened.

So moving to the current version where all features are being added for eventual implementation.

DanChadwick’s picture

Issue summary: View changes

If no context is available, then a static would have to be used. Since I think the token browser is only used one node at a time, this should work.

I think this would be a nice feature. Anyone want to work on a patch?

DanChadwick’s picture

Status: Active » Closed (won't fix)

I looked more closely at this. Token simply does not anticipate the possibility that different tokens might be presented for different nodes. The tokens are loaded from a cache, which you would have to prevent and clear appropriately. The tokens are collected and reduced to just the ones to be presented, so you would either have to give all the tokens for all the webform nodes (not realistic), or somehow hack some cache of which node is being considered. And the tokens are presented in a different HTTP request when the dialog token browser is used.

While it might be possible to hack this together, it certainly isn't worth it. Too bad.

Oliver71’s picture

FileSize
6.38 KB

Please delete if not appropriate for issue submission. New to Drupal.org and Webforms.

Token syntax is unknown, see image attached.

When submitting a form, the corresponding node (content item) does not have unique titles. Would like to use field content from the form itself.

Thank you!