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,
I got a Webform in a Block using the Webform Block module. Is it possible to see in the submission email we recieve, which page/node the webform was submitted from...
I have several different pages/nodes, but using the same webform (block).. I want to see from which page/node the webform(block) was submitted..
Iam using url alias, so I would love to see the current url alias...
Or Page Title... or anything else User-friendly readable..
Thanks for the help.
Comments
Comment #1
buddawebform allows inserting $_SERVER variables in to your emails. Experiment with them.
Comment #2
dthiessen CreditAttribution: dthiessen commentedThe above solution does work but I believe only with logged in users. Is there a way to get the current url for anonymous users as well?
Comment #3
sdragnev CreditAttribution: sdragnev commentedHere's the code I added to the webform.module to get it to work for me when used in a block:
The title in the if statement is whatever the webform node title is for you.
Ugly but it works.
Derived it from the patch submitted by amccabe at http://drupal.org/node/1224130.