How can I pre-populate fields in a form that's in an iFrame?

  • Profile Image
    guest_23315855275053
    Asked on November 27, 2012 at 04:05 PM

    I want to get data from a previous page, say page A to a jotform that's in an iFrame on page B.

    Is it possible to use URL parameters to prepoluta this form?
    For example with this URL: http://www.jotform.com/form/1234?name=ThisIsMyName

    Thanks for your help!

  • Profile Image
    fxr
    Answered on November 27, 2012 at 04:48 PM

    You would need to enable sending of POST variables on your first form.

    @ http://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page

    --

    On the second page, you would then read these POST variables with php, and generate your iframe code with those variables.

    You code would look something like this:

    <?php

    $name = $_POST['name']; 

    ?> 

    <iframe src="//www.jotform.com/form/1234?name=<? echo $name; ?>" height="300px" width="100%"></iframe>

     

    --

    You may well need a little more help than but can you make a start and we will do what we can to help out.

     

  • Profile Image
    luisgar2001
    Answered on April 11, 2013 at 07:56 AM

    How to do that if not working with php, just javascript?

  • Profile Image
    jonathan
    Answered on April 11, 2013 at 09:26 AM

    @ luisgar2001

    Hi, I suggest you create your own topic for your question.

    Please click on the link to do this.

    http://www.jotform.com/contact

    What you wanted to do in javascript is very much possible. Here is a sample page.

    Just post your own question, and we will attend to you at once.

    Thanks.