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

    Pass URL to Lightbox Delayed AutoPopup

    Asked by precisionsails on October 12, 2013 at 04:18 PM

    I have tried uncessefully to pass a page URL to a hidden field in my lightbox form that is set to autopop up on page lode.

    Im sure the problem has to do with the autopopup and not clicking on a link.  How can i modify my code to get the page url to pass into my hidden field named q13_pageaddress when using delayed auto popup lightbox?



    The code I am using is as follows:

    <script src="//www.jotform.com/min/g=feedback" type="text/javascript">
    new JotformFeedback({
    formId:'32845595620258',
    base:'http://jotform.ca/',
    iframeParameters: {
    'q13_pageaddress': document.URL},
    windowTitle:'Let us help you.',
    background:'#FFA500',
    fontColor:'#FFFFFF',
    type:false,
    height:500,
    width:700,
    });

    </script>

    <a id="lightboxdelay" class="lightbox-32845595620258" style="cursor:pointer;color:blue;text-decoration:underline;"> </a>


    <script language="JavaScript">

    var delayseconds = 1;
        function pause() {
        myTimer = setTimeout('whatToDo()', delayseconds * 1000)
        }

       function whatToDo() {
    document.getElementById('lightboxdelay').click();
       }

    window.onload = pause;

    </script> 

    Page URL:
    http://www.precisionsailloft.com/Abbott-22-Sails-for-Sale-cu-s/1245.ht<br/>m

    lightbox form JotForm problem style size
  • Profile Image
    JotForm Support

    Answered by EltonCris on October 12, 2013 at 06:48 PM

    Hi,

    Your code is fine, however you have to use the hidden field name after the underscore. So from q13_pageaddress to pageaddress only.

    Example:

    <script src="//www.jotform.com/min/g=feedback" type="text/javascript">

    new JotformFeedback({

    formId:'32845595620258',

    base:'http://jotform.ca/',

    iframeParameters: {

    'pageaddress': document.URL

    },

    windowTitle:'Let us help you.',

    background:'#FFA500',

    fontColor:'#FFFFFF',

    type:false,

    height:500,

    width:700

    });

    </script>

    <a id="lightboxdelay" class="lightbox-32845595620258" style="cursor:pointer;color:blue;text-decoration:underline;"> </a>

    <script language="JavaScript">

    var delayseconds = 1;

        function pause() {

        myTimer = setTimeout('whatToDo()', delayseconds * 1000)}

       function whatToDo() {

    document.getElementById('lightboxdelay').click();}

    window.onload = pause;

    </script> 

    That should work. Cheers!

  • Profile Image

    Answered by precisionsails on October 12, 2013 at 07:29 PM

    lol, thank you so much. Rediculous how much extra time this took me all because of a few little letters!

  • Profile Image
    JotForm Support

    Answered by EltonCris on October 12, 2013 at 07:52 PM

    @precisionsails

    No worries. I have also encountered this before without knowing that names should be like that unlike normal forms. :)

    Thanks for using Jotform by the way. 

    Regards!