Hi guys,
I use the eForm, however I can’t work out how to grab the HTTP referrer and pass this onto the eForm as a field and get this sent back to us.
<?php
$referringPage = parse_url( $_SERVER['HTTP_REFERER'] );
parse_str( $referringPage['query'], $queryVars );
echo $queryVars['q']; // This is the search term used
}
?>
I’ve also found the post here, but not sure how to go forward
http://modxcms.com/forums/index.php/topic,56590.0.html
Are there any experts on how I could implement this?
Another concern is that if they are visiting one page, then click on another, before they get to the form, how does the initial the Referrer get stored/passed?
Thanks so much in advance for any input.
Regards