By eliza411 on
Can someone point me to documentation or explain how to pass on the page a user was on when they clicked the link to a webform.
I'm building a contact form to be called from any page on a large site. Since our users often assume we know what they were looking at when they click "Contact Us" it's helpful to have the server supply that URL. I tried %server[HTTP_REFERER], but that only gives the URL of the webform itself. I need to go back one page.
Thanks in advance for any help you can provide.
Comments
Pass url as get variables
You can use get variables to pass info to your form. The link to the form should be something like this.
<a class="icon email-go" href="/node/20?title=<?php echo $title; ?>&url=<?php echo $node_url; ?>">Ask About Availability</a>In your form you can use %get[title], %get[url] to access the values.
Webform is sadly lacking in documentation and examples. I have been trying to put PHP code into a markup field with no success.