passing URL to Webform I am developing a site (Drupal 7, Omega sub-theme, panels &amp; views). On every product page I have a link to the webform. I need the webform to register to which page the customer is referring. In other words, where is the link coming from, or what is URL of the last visited page?
Is there a specific drupal way of doing this?
Or any other way, for that matter?
Thanks!
On you link display something like this :

$current_path = current_path();
$current_path_alias = drupal_get_path_alias($current_path);    
print url('my-webform', array('query' =&gt; array('from' =&gt; $current_path_alias )));


If you are on content/mynode, the link will display my-webform?from=content/mynode.
If you want just the unaliased path skip the use of dupal_get_path_alias()

$current_path = current_path(); 
print url('my-webform', array('query' =&gt; array('from' =&gt; $current_path)));


If you are on node/18, the link will display my-webform?from=node/18.