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 embed a prepopulated form?

    Asked by melodicsounds on April 07, 2016 at 06:47 PM
    how to embed a prepopulated form??? So now I need to show the preopoulated form to my user.. how to achieve this?
  • Profile Image
    JotForm Support

    Answered by Kevin_G on April 07, 2016 at 07:31 PM

    When you get the code to embed the form you are provided with the link to the form as well, you only need to paste the variables the same way as you are prepopulating the URL using the direct link, if you are using the default (Javascript) embed method then your code should look like this:

    <script type="text/javascript" src="https://form.jotform.com/jsform/60977024248965?email=support@jotform.com&name=JotForm"></script>

    If you are using the iframe method then your code will look like this one: 

    <iframe

          id="JotFormIFrame"

          onload="window.parent.scrollTo(0,0)"

          allowtransparency="true"

          src="https://form.jotform.com/jsform/60977024248965?email=support@jotform.com&name=JotForm"

          frameborder="0"

          style="width:100%;

          height:539px;

          border:none;"

          scrolling="no">

        </iframe>

    This will work if you want to set static data, but if you want to send the variables dynamically then you will need to use some PHP code in the web page that you will embed the form, the code should look something like this: 

    Default Javascript method:

    <?php

    $email = $_REQUEST["email"];

    $name = $_REQUEST["name"];

    ?>

    <script type="text/javascript" src="https://form.jotform.com/jsform/60977024248965?email=<?php echo $email; ?>&name=<?php echo $name; ?>"></script>

    Iframe method:

    <?php

    $email = $_REQUEST["email"];

    $name = $_REQUEST["name"];

    ?>

     <iframe

          id="JotFormIFrame"

          onload="window.parent.scrollTo(0,0)"

          allowtransparency="true"

          src="https://form.jotform.com/jsform/60977024248965?email=<?php echo $email; ?>&name=<?php echo $name; ?>"

          frameborder="0"

          style="width:100%;

          height:539px;

          border:none;"

          scrolling="no">

        </iframe>

    You will need to pass the data over the URL and using the PHP variables, here is a sample link about it: https://shots.jotform.com/kevin/Samples/813347/test.php?email=support@jotform.com&name=JotForm

    I'm getting the variables via PHP and populating the data using the Javascript method. 

    Hope this helps and let us know if you have questions.