Send current page URL to popup form hidden field when form is loading from separate php file?
<p>I'm using fancybox on WordPress to load a form from another template file. The page URL I need looks like <code>http://domain.com/blog/#panier</code> </p>

<p>My template file code is</p>

<pre><code>&lt;?php require('../../../wp-blog-header.php');?&gt;
&lt;style&gt;
#header, #footer{
    display:none;
}
&lt;/style&gt;
&lt;?php get_header(); ?&gt;
&lt;script&gt;
    jQuery(document).ready(function ($) {
        jQuery('#header, #footer').css("display","none");
        });
&lt;/script&gt;
&lt;?php echo do_shortcode('[contact-form-7 id="330" title="Enquire Form"]'); ?&gt;
&lt;?php get_footer(); ?&gt;
</code></pre>

<p>I'm using contact form 7 and loading the short code in the template file.</p>

<p>Another plugin i'm using take the current URL of the page and sets it as a hidden field but because the form is loading from a template file and isn't placed directly on the page the hidden field value is wrong</p>

<pre><code>&lt;div class="hidden" style="display:none;"&gt;
&lt;input type="hidden" name="hidden-742" value="http://domain.com/blog/?p=29" class="wpcf7-hidden"&gt;
&lt;/div&gt;
</code></pre>

<p>How can I get the current URL of the page when the link is clicked to open the form. Then pass that URL to the forms hidden field and set it as the value?</p>

<p>Thanks</p>
