Hi there, my URL is riskwatch. I'm new to GF but it is mighty powerful! Here's what I'm trying to do. I have a fixed tab on the right side which says 'EMail This Page'. When someone clicks on it, I want them to be able to enter the email address of the person they wish to send it to, but in the body of the email I want to put the URL of the page they are ON, so the recipient of the email can either click on the link or copy/paste it in their browser. Here's what I've tried. I have the fixed tab set up in an HTML module (using Builder Default Theme). It is set up as an href=mailto: with the {referer} in the &body of the email. I created a form with a hidden field and under Advanced I selected HTTP Referer URL. I added the function; add action to my functions.php file like so:
add_filter("gform_field_value_refurl", "referral_url");
function referral_url($form){
//Grab URL from HTTP Server Var and put it into a variable
$refurl = $_SERVER['HTTP_REFERER'];
//Return that value to the form
return esc_url_raw($refurl);
}
As you can see, this doesn't work. Am I approaching this correctly? If not, could you please provide some step by step instructions that I could follow? Thank you in advance for your time and have a great day.
Todd