Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
first of all, thank you for this wonderful module!
I am preparing for migration from Webform 3.x to 4.x. Just noticed that in Webform 4.x Special tokens are missing.
Especially,
%server[HTTP_USER_AGENT]
%session[id]
are gone!? I’ve looked through the available tokens however I can’t find them. How do I attach the USER_AGENT to the E-mail template?
Comments
Comment #1
DanChadwick CreditAttribution: DanChadwick commentedIf they aren't provided by the token manager via the current-page or other tokens, then they are gone. I have no idea what token provides. These aren't related to webform's tokens.
The token browser will show you what's available. If you need something that isn't available, you (or your developer) can always write a mocule to provide it.
Webform 4.x uses standard tokens.
Comment #3
sgorneau CreditAttribution: sgorneau commentedThis is a pretty big omission that seems rather nonchalantly thrown aside. These special tokens have been there for what seems like forever and offer great insights into user context; for example feedback forms where environment data is very helpful. While they were never part of the Token ecosystem, they were certainly part of Webform.
Comment #4
giupenni CreditAttribution: giupenni commentedI agree with #3.
This is a pretty big omission, with 3.x I could use %get instead after upgrade to 4.x not.
I have to go back to 3.x .
Comment #5
giupenni CreditAttribution: giupenni commentedComment #6
wavesailor CreditAttribution: wavesailor as a volunteer commentedHas anyone figured out a solution to get HTTP_USER_AGENT or HTTP_REFERER yet?
Comment #7
howdytom CreditAttribution: howdytom as a volunteer commentedno, I am still looking for a solution.
Comment #8
giupenni CreditAttribution: giupenni commentedA workaround is try to use webform in combined with Prepopulate module.
Anyway I hope will be fixed this omission.
Comment #9
swhitters CreditAttribution: swhitters as a volunteer commentedCustom module solution here.
I tried this to pass the referrer into webform and it worked for me. Use [server:HTTP_REFERER].
Comment #10
DanChadwick CreditAttribution: DanChadwick commented