What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

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

    Asked by humbuckermusic 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

     

     

    Page URL:
    http://www.humbuckermusic.com/moog-mf-101-moogerfooger-oak-pedal.html

    referrer title document.title lightbox referrer
  • Profile Image

    Answered by Ben 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

    Answered by humbuckermusic 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
    JotForm Support

    Answered by Mike_T 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.