• Hi,
    I inserted the following code into functions.php to pass the referring url in the form:

    <?php 
    function populate_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);
    }
    ?>

    Now I would like to use a hidden field to get the referring url transmitted by sending the form. But what do I have to put in the hidden field exactly. I′ve tried everything, but I′m not able to do it.

    (Value): Is it {GET:refurl}? or {GET:$refurl}? or other code? Nothing is working. thank you!!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to get the referring url?’ is closed to new replies.