Getting the URL correctly

Remove the¬†{embed_url} code, Create a hidden field on your form. Allow the field to be populated dynamically by accessing the advanced tab and enabling the checkbox. Give it a parameter name:¬†refurl Then add the following code at the bottom of your enabled theme’s functions.php file add_filter( ‘gform_field_value_refurl’, ‘populate_referral_url’); function populate_referral_url( $form ){ $refurl = $_SERVER[‘HTTP_REFERER’]; […]