How can I pre-set via API default values for questions in a form?

  • handsomejackmi
    Asked on June 20, 2019 at 2:15 PM

    Hello,

    We want to show users a jotform form in an iframe with series of question, and we want to show each user personalized form, i.e. we want to put in some questions default values user's data. 

    is there any way we can pass that information into iframe so it can be pre-populated with user data?

    Alternative can be to change form's questions before showing it to each user but I also cannot find mention of default fields in the API reference.

    Please advice how can we achieve that

    Thanks!

  • John Support Team Lead
    Replied on June 20, 2019 at 3:34 PM

    I believe this guide can help achieve the requirement: Prepopulating the fields to your JotForm via URL parameters

    So if you'll be using an iframe embed code, you can append the URL parameters on the JotForm URL. Example:

    <iframe allowtransparency="true" src="//form.jotformpro.com/form/91685654266974?fullName3[first]=John&fullName3[last]=Doe" frameborder="0" style="width:100%; height:562px; border:none;" scrolling="no"></iframe>

    Here's how you can get the iframe embed code:

    1561059196iframe embed code Screenshot 10

  • handsomejackmi
    Replied on June 21, 2019 at 1:35 PM

    Hi!

    Thanks! That definitely what I'm looking for!

    I have an additional question - can we also set somehow redirect url on fly while displaying iframe? As we want to redirect each user to individual and unique link 

    Thank for your help!


  • John Support Team Lead
    Replied on June 21, 2019 at 3:34 PM

    I have moved your additional question to a new thread to avoid confusions.

    You can view it via this link below:

    https://www.jotform.com/answers/1866080