How to properly get the webpage 'title' variable using referrer in Lightbox

  • Profile Image
    humbuckermusic
    Asked on November 25, 2014 at 02:39 PM

    When a person to fills out a form, that form will pass the page's title to me via email using a hidden "referrer" field.

    Everything is working well, except if they fill out the form on multiple pages it will always pass the same title, which is the first page they visited to use the form.

    Is there anyway to get the referrer variable to pass the correct page?

    In the page url listed below, you have to click on "NEED PRICING?  CLICK HERE"

     

    My code is this:

     

     

    moog-price.jpg

     

     

  • Profile Image
    Ben
    Answered on November 25, 2014 at 04:37 PM

    Hi,

    You are using this code on your page to show the jotform:

    <script src="//www.jotform.com/min/g=feedback" type="text/javascript">
    new JotformFeedback({
    formId:'32458208875968',
    base:'http://jotformpro.com/',
    iframeParameters: { 'referrer': document.title},
    windowTitle:'MOOG PRICE REQUEST',
    background:'#8ec69f',
    fontColor:'#112244',
    type:false,
    height:500,
    width:450
    });
    </script>
    <a class="lightbox-32458208875968" style="cursor:pointer;color:blue;text-decoration:underline;"><img src="//lib.store.yahoo.net/lib/humbucker/moog-price.jpg"></a>

    Is there anyway to get the referrer variable to pass the correct page?

    You are passing referrer value as the actual document title, now depending on what you would like to get we can alter this. Could you please tell us exactly what do you mean by "pass the correct page"? Do you mean this popup 'page' or the title of the page you are on when you click on that image?

    Best Regards,
    Ben

  • Profile Image
    humbuckermusic
    Answered on November 25, 2014 at 04:44 PM

    Hello Ben,

    By "pass the correct page" I mean the title of the page you are on when the image is clicked.

    Thanks!

     

  • Profile Image
    Mike_T
    Answered on November 25, 2014 at 06:08 PM

    Everything is working well, except if they fill out the form on multiple pages it will always pass the same title, which is the first page they visited to use the form.

    It seems to be related to enabled Autofill option on your form. Please try to disable that option to see if that works.

    Thank you.