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

    passing variable to lightbox script works, but form does not resize

    Asked by Joe on August 02, 2012 at 04:12 PM

    I want to use the same lightbox form through all of my sites. 

    However I would like to collect a city variable via a hidden field.

    I have tried to pass the city on the end of the form ID and have made that work by editing the source of the form itself but as soon as I edit the form via the web iterface the server file is recreated? 

    IE: formId:'22130158359.html?city=LA',

    What is the correct way to pass a variable from the source of the lightbox into a hidden field?

  • Profile Image
    JotForm Support

    Answered by Mike_T on August 02, 2012 at 05:54 PM

    Thank you for contacting us.

    You can use a method described in the following article:

    Adding parameters in Lightbox and Feedback forms

    However, it works with our Prototype based lightbox code only. When you get your form Lightbox code it looks like:

    < script src="//jotformeu.com/min/g=feedback2" type="text/javascript" >


    g=feedback2 - means jQuery based lightbox code (it is our updated lightbox code)

    g=feedback - means Prototype based lightbox code (it is the old lightbox code, and it works with added parameters)

    In other words, you will have to change g=feedback2 to g=feedback in your lightbox code to use pre-population method from the mentioned above article.


    You can also add a Default Value to your hidden field.

    If you need any further assistance, please let us know.

  • Profile Image

    Answered by dcw_web on August 06, 2014 at 10:15 PM

    hi the above article is not working for me, i am trying to pass a value to hidden field but on submit its not passing the value to the back end.

    My Code is :

       <script src="//max.jotfor.ms/static/feedback2.js?3.2.3070" type="text/javascript">

    new JotformFeedback({

    formId: 'xxxxxxxxxxx',

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

    windowTitle:'Registration Form',

    iframeParameters: {

    'q30_pixelCode': 'CC22Jaz'










    <a class="lightbox-xxxxxxxxxx"><div class="Button">Register Now</div></a>


  • Profile Image

    Answered by dcw_web on August 06, 2014 at 10:45 PM

    i have made few changes in script tag and its working but now i have a new problem :

    Code changes i have made 

    <script src="//max.jotfor.ms/static/feedback.js?3.2.3101" type="text/javascript"> 

    'pixelCode': 'CC22Jaz'

    the problem is if i use feedback2.js?3.2.3101 then form is re-sizing automatically according to the form fields and window size but the value is not passing through.

    on the other hand if i use  feedback.js?3.2.3101 then value is passing successfully but form dose not authorize and vertical and horizontal scrolls are added to the form.  

    i am looking for a solution in which i can pass the value and form should re-size automatically. 


  • Profile Image
    JotForm Support

    Answered by jonathan on August 07, 2014 at 06:10 AM

    @ dcw_web


    Can you please share to us the URL of the website where we can check the embedded form and the lightbox code.

    We will be able to figure out a better suggestion if we can check them in actual.

    We will wait for your update.