pre-populate a form in an iFrame (dynamic var) (javascript) (not from another form)

  • Profile Image
    luisgar2001
    Asked on April 15, 2013 at 08:14 AM

     

    I have a web page    www.page.com.

    I mail it to different people with a customización variable

    www.page.com?var=whatever-1 

    www.page.com?var=whatever-2 

    ........................................................

    www.page.com?var=whatever-N 



    The web page (www.page.com) loads the form in an iframe.


    I want to load the form and propopulate it with parameter var.

    I'm able to capture var value and use it to customize the web page, but not to prepopulate the form in the iframe (just using html and javascript )


    - Therefore PHP is not an option for me.

    - I do not want to prepopulate the form form another form.


    I have not seen any post and answer with these requirements in the forum.

    Please help me to do it. Thanks in advance,                 Luis 

  • Profile Image
    KadeJM
    Answered on April 15, 2013 at 09:46 AM

    Hello Luis, the most commonly used method of prepopulation is mentioned in our guides found here http://www.jotform.com/help/107-How-to-Enable-Prepopulating-Fields and here http://www.jotform.com/help/71-Prepopulating-the-fields-to-your-JotForm-via-URL-parameters

    However, If I am understanding you correctly I think that you would prefer using html and javascript instead of the method mentioned in the url parameter guide. It should be possible to build this but this means you will have to download the form's full source code and then use some custom javascript programming knowledge to generate the strings which would call this type of information to then be forwarded. Be advised though that this will have to be done outside of JotForm and you will need to be careful when doing this since there is a chance that it could create a conflict with our library here on JotForm.  So because of that you will just have to be sure of everything by checking the names of the values, inputs, id's, and such for this to avoid that problem.