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 do I pass URL into hidden field for Popup form linked from an image?

    Asked by humbuckermusic on August 01, 2013 at 09:15 AM

    Hereis what I am using now, but it doesn't work, so I know I'm doing something wrong.  I got this code from a different thread on this forum.

     

    <script>

    var referrer = window.parent.location.href;

    document.write("<a target="_blank" href=\"javascript:void( window.open(\'http://form.jotform.us/form/32123607120135?hiddenfield=\' +referrer, \'blank\',\'scrollbars=yes,toolbar=no,width=460,height=550\'))\"><img src="//lib.store.yahoo.net/lib/humbucker/notify-stock-small.jpg" height="27" width="145">Stock Notification</a>");

    </script>

    Also, I'm not too sure how I would get the popup to come up when an image is clicked.  As you can see, the image is located here: http://lib.store.yahoo.net/lib/humbucker/notify-stock-small.jpg

    Any ideas?  Thanks!

     

     

     

    hidden JotForm style height jpg
  • Profile Image
    JotForm Support

    Answered by EltonCris on August 01, 2013 at 12:08 PM

    Hi,

    Let us work on this and get back to you. Please stay tuned!

    Regards!

  • Profile Image
    JotForm Support

    Answered by EltonCris on August 01, 2013 at 12:17 PM

    You may try this code:

    <script>

    var referrer = window.parent.location.href;

    document.write("<a target="_blank" href=\"javascript:void( window.open('http://form.jotform.us/form/32123607120135?referrer=' +referrer, 'blank','scrollbars=yes,toolbar=no,width=460,height=550'))\"><img src='//lib.store.yahoo.net/lib/humbucker/notify-stock-small.jpg'></a>");

    </script>

    Demo: https://shots.jotform.com/elton/demo_251265.html

    You will notice there's a captured window URL on top ?referrer=captured window URL.

    Let us know if you need anything else. Thanks!