How to prepopulate fields?

  • EmeraldDonors
    Asked on June 26, 2020 at 5:07 AM

    Hi there,


    I found this article: https://www.jotform.com/help/528-How-to-Pre-Populate-the-Same-Form-with-Data-from-a-Previous-Submission


    But I cant access demo etc / I think it is old. How do I do this now?


    Basically, my users will submit their initial form & then the full form but I would like it when they go to the full form the answers from their initial form are there.


    Thank you!

  • Bojan Support Team Lead
    Replied on June 26, 2020 at 6:23 AM

    Greetings and thank you for your message.

    If you wish to redirect your users to another form after they are done with the first one, you need to modify the thank you page. 

    To get started, you need to open the form settings, select Thank you page on the left menu, and select Redirect to external link:

    How to prepopulate fields? Image 1 Screenshot 60

    Here, you need to enter the URL of a second form, the one where your users should be redirected to after they submit. You can find the form URL from the publish tab:

    How to prepopulate fields? Image 2 Screenshot 71

    You need to add additional information to this link. To get started, add a question mark at the end:

    https://form.jotform.com/200805103591000? 

    The next step is to get the names of the fields you wish to fill from the second form. You need to open the direct link of the second form in a new tab to get the field name. 

    Once you have the form open, right-click on a first field you need to populate, and select Inspect:

    How to prepopulate fields? Image 3 Screenshot 82

    Please note that Firefox and Safari will say Inspect Element. This screenshot was taken in Chrome.

    When you select this option, a new panel should open, with some text selected. You need to find the name attribute:

    How to prepopulate fields? Image 4 Screenshot 93

    In this example, the name is q3_firstQuestion. You can double click it to enable editing, and then you can copy it. From this name, you need to remove everything and including underscore. From q3_firstQuestion you should get firstQuestion.

    You need to include this in the URL, followed by an equal sign, so now it looks like this:

    https://form.jotform.com/200805103591000?firstQuestion=

    The final step is to get the values from the fields on the first form you wish to transfer to the second one. This is done using a unique name. You can get the unique name from the field properties:

    How to prepopulate fields? Image 5 Screenshot 104

    Once you copy the unique name, you need to add it to the URL, wrapped between curly brackets:

    https://form.jotform.com/200805103591000?firstQuestion={test}

    {test} will be replaced with whatever user inputs in this field, and it will be sent to the second form.

    If you need to send multiple fields, you need to repeat this process, and separate values with the & sign:

    https://form.jotform.com/200805103591000?firstQuestion={test}&secondQuestion={secondTest}

    You can click here for more information.

    Let us know if you need any further assistance. 


  • EmeraldDonors
    Replied on June 26, 2020 at 3:38 PM

    Thank you so much!


    I have 2 questions:


    1. When adding additional information to the link (is this the link in the first or second form?)

    2. When I right click (I am on a mac) I only get the below options. I tried on Firefox & Chrome!


    1593200299Screen Shot 2020 06 26 at 21 Screenshot 10

  • Mike_G JotForm Support
    Replied on June 26, 2020 at 7:16 PM

    1. When adding additional information to the link (is this the link in the first or second form?)

    It should be the link to the form you are trying to pre-fill and redirect your respondents to. In your case, it should be the second form.

    2. When I right click (I am on a mac) I only get the below options. I tried on Firefox & Chrome!

    You will right-click to inspect the element of your form fields, not on the builder page of your form, but when you preview your form. You can get the direct link to your form, load it to your browser, and inspect the element as instructed above by my colleague.

    Where-to-Find-My-Form-URL

  • EmeraldDonors
    Replied on June 27, 2020 at 3:19 AM

    Awesome that helps loads! Thank you so much guys! Sorry, I am trying my best here!


    Now that I have this code that I created - where exactly do I put this now?


  • Vick_W Jotform Support
    Replied on June 27, 2020 at 4:21 AM

    Hey there,

    Thanks for writing back to us.

    You'll have to put it in the "Change Thank You Page" Conditional logic. In your form builder settings, you can find it in your form builder "Conditions" settings. Please check out the step by step guide below for a detailed explanation.

    https://www.jotform.com/help/317-Change-Thank-You-Page-URL-Based-on-a-Condition

    In "Redirect To URL after submission" you can enter your URL.

    You can also check this guide that actually shows the pre-populated URL being used in the condition. A demo form is available as well in the guide.

    Let us know if you need further assistance.

    Thanks

  • EmeraldDonors
    Replied on June 28, 2020 at 11:58 AM

    Awesome it is working great so far!

    I just need help with 2 more things:


    1. Can I make some kind of condition where the next button only shows once the user has pressed save on the save/preview widget?


    1593359251Screen Shot 2020 06 28 at 17 Screenshot 10

    2. When I am inspecting the Date of Birth I cannot find the name attribute? How would I overcome this?


    1593359446Screen Shot 2020 06 28 at 17 Screenshot 21

  • Ashwin JotForm Support
    Replied on June 28, 2020 at 2:06 PM

    1. Can I make some kind of condition where the next button only shows once the user has pressed save on the save/preview widget?

    Unfortunately no, it is currently not possible to check if save button (Continue Forms Later) of form is clicked or not and trigger any condition accordingly. It is not possible to trigger any condition based on the click of save button. 

    2. When I am inspecting the Date of Birth I cannot find the name attribute? How would I overcome this?

    Please note that for date field, you need to use the unique name to populate day, month & year separately. Please use the following URL parameter to populate date field of your form:

    https://www.jotform.com/form/201775513877565?dateOf[day]=28&dateOf[month]=06&dateOf[year]=2020

    Please check the screenshot below on how to check the unique name of field:

    1593367588uniqueName Screenshot 10

    Hope this helps.

    Do get back to us if you have any questions.

  • EmeraldDonors
    Replied on June 29, 2020 at 2:23 AM

    Awesome, nearly there! Here is my link so far:

    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName[first]}&fullName[last]={fullName[last]}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[day]=28&dateOf[month]=06&dateOf[year]=2020={dateOf}


    1. The date of birth is pulling through like this. Please assist where I am going wrong?

    1593411671Screen Shot 2020 06 29 at 08 Screenshot 10


    2. How do I inspect & pull through info from a radio button? I have 1 or 2 I would like to add but cant seem to get it to work.

  • Vick_W Jotform Support
    Replied on June 29, 2020 at 4:03 AM

    Hey there,

    Thanks for writing back to us.

    To add the correct parameters to pre-populate date field please check out this thread

    For your second question please check out the guide below. 

    https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters

    We also have an app that helps you generate your prepopulated form URL.

    https://prepopulate.jotform.io/

    Let us know if you need further assistance.

    Thanks.

  • EmeraldDonors
    Replied on June 29, 2020 at 3:54 PM

    Hi there,


    Unfortunately, the app didn't help (it just filled in the form?) I need another form to pull the info through as achieved above).

    I also couldn't apply the logic of the thread to my situation for the date. Probably too advanced. I hope you can assist as I really need to get my form done :(.


    Thank you.


  • Mike_G JotForm Support
    Replied on June 29, 2020 at 5:22 PM

    Please allow me some time to further check the issue you are having. I'll get back to you on this support ticket with my findings as soon as possible.

  • Mike_G JotForm Support
    Replied on June 29, 2020 at 5:38 PM

    The Date field is an object so when passing a value to it via URL parameters, it should be like this.

    https://form.jotform.com/201806913464960?dateOf[month]=12&dateOf[day]=6&dateOf[year]=2020

    Result:

    1593466119zt200629 172738 Screenshot 10

    As for your other concern,

    2. How do I inspect & pull through info from a radio button? I have 1 or 2 I would like to add but cant seem to get it to work.

    can you please elaborate on what exactly you are trying to accomplish here? Do you wish to pass data from a Single Choice field (aka radio button) of a form to a Single Choice field in another form? If that is the case, I suggest that you check the information in this guide — How-to-Automatically-Pass-Form-Data-to-Another-Form

    Feel free to let us know if you need any further assistance.

  • EmeraldDonors
    Replied on June 30, 2020 at 11:40 AM

    Hi there,


    It is still not working. I put my Date of Birth in 03/03/89 & the following appeared on the 2nd form which is completely wrong.


    1593531250Screen Shot 2020 06 30 at 17 Screenshot 10


    The checkbox option didn't draw through properly. I selected I had donated & it still isn't pulling through the second form:


    1593531515Screen Shot 2020 06 30 at 17 Screenshot 21


    I really need to roll out this. If someone could assist? Its taken a lot of posts & days. If it is too complicated let me know - but I feel one check box & one date of birth should be able to pull through & not be too hard. Here is my formula - please could someone look at it & dissect it - not send unrelated links. Thank you - sorry to be annoying but working on a tight deadline.


    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[month]=12&dateOf[day]=6&dateOf[year]=2020&input_226_0={youUnderstand}




  • EmeraldDonors
    Replied on June 30, 2020 at 11:43 AM

    Form 1 =Emerald Donors - Initial Application Form

    Form 2 = Clone of Emerald Donors - Full Application Form


    I hope this helps.

  • Ashwin JotForm Support
    Replied on June 30, 2020 at 12:59 PM

    You have copied my colleague's sample code as it is and that is the reason why you see 06/12/2020 in the date field. 

    If you want to pass the date of birth value from form 1 to form 2, please use the following URL with parameters in thank you URL:

    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[month]={dateOf:month}&dateOf[day]={dateOf:day}&dateOf[year]={dateOf:year}&input_226_0={youUnderstand}

    Hope this helps.

    Do try it out and get back to us if you have any questions. 

  • EmeraldDonors
    Replied on July 2, 2020 at 4:56 PM

    Great thank you! That does help. However, the checkbox is still not pulling through - could someone see what I am doing wrong in my URL please :). Thank you.

  • Mike_G JotForm Support
    Replied on July 2, 2020 at 6:15 PM

    We will be glad to further help you with your concern. May we just ask which "checkbox" field in your first form (Emerald Donors - Initial Application Form) is not being passed to which checkbox field in your second form (Clone of Emerald Donors - Full Application Form), please?

    We will wait for your response.

  • EmeraldDonors
    Replied on July 3, 2020 at 2:33 AM

    Hi there let me summarise the post for you:

     

    Application 1 - Initial/Original Form

    https://hipaa.jotform.com/201752709278360

    Application 2 - 2nd form I need prepopulated.

    https://hipaa.jotform.com/201775513877565

    My URL as per abbove instructions:

    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[month]={dateOf:month}&dateOf[day]={dateOf:day}&dateOf[year]={dateOf:year}&input_226_0={youUnderstand}

    My Issue:

    Q55 - Have you ever donated your eggs?
    It is a checkbox. Just 1 checkbox.
    If I select this answer in FORM 1 it doesn't pull through in FORM 2. Please see my URL below with the section in question highlighted.

    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[month]={dateOf:month}&dateOf[day]={dateOf:day}&dateOf[year]={dateOf:year}&input_226_0={youUnderstand}

    As you can see, this has taken me over a week to try and solve & 19 posts later of back and forth where it is apparent I DONT UNDERSTAND. I managed everything else, but not the checkbox. I think it is best that instead of pointing me to another article, that never works for the millienth time - if you could pretty pretty pretty please help a girl out who honestly was meant to have this done 6 days ago by just TELLING ME WHAT TO WRITE. I would BEYOND appreciate it because I am honestly close to bursting into tears & giving up. SO PLEASE SPOON FEED ME with this. I would really REALLY REALLY appreciate it and the help. Thank you.

     

    I really hope this will be the last post of this thread and I can be less close to an ulcer hahahah.

  • Vick_W Jotform Support
    Replied on July 3, 2020 at 6:59 AM

    Hey there,

    Thanks for writing back to us.

    Please also accept our apologies for the inconvenience this has caused. I do have the final link for you that will pre-populate the checkbox field as well. But before you use it you have to make sure that the checkbox filed should have the same "UNIQUE NAME" in both forms.

    1593773063screenshot Screenshot 10

    Here is a guide to finding these settings.

    https://www.jotform.com/help/146-How-to-Find-Field-IDs-and-Names

    In your first form it is "youUnderstand" so you need to change this in your second form. 

    https://hipaa.jotform.com/201775513877565

    Once changed please use the following link to prepopulate your second form:

    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[month]={dateOf:month}&dateOf[day]={dateOf:day}&dateOf[year]={dateOf:year}&youUnderstand=Yes

    I've tested this link multiple time already to make sure that it works.

    Here are the cloned forms that I've tested on.

    1st Form:

    https://form.jotform.com/201842165468963

    2nd Form:

    https://form.jotform.com/201842015518953

    Just in case if there is still an issue then let us know and we are here 24/7 to help you.

    Thanks.

  • EmeraldDonors
    Replied on July 9, 2020 at 5:04 AM

    Great! Thank you that worked perfectly. Could you please help me with the following:


    Form 1:
    https://hipaa.jotform.com/201752709278360
    Referring to: Page 7: Would you like to include an introductory video in your profile? This highly increases your chances of being matched but is not compulsory.

    Form 2:
    Referring to: Page 10: Would you like to include an introductory video in your profile? This highly increases your chances of being matched but is not compulsory.


    I would like to have the answers from Form 1 prepopulated to Form 2. They are also single choice checkboxes.


    Please let me know if that doesn't make sense.
     
    Thank you.
  • Ashwin JotForm Support
    Replied on July 9, 2020 at 6:23 AM

    You need to use "wouldYou={wouldYou}" in the URL parameter to pass the value of this field from first to second form. Please use the following thank you page URL in your first form and that should solve your problem:

    https://hipaa.jotform.com/201775513877565?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email5={typeA}&typeA7={typeA7}&heightcm={heightIn19}&weightkg={weightIn}&typeA21={typeA21}&typeA22={typeA22}&typeA32={typeA32}&pleaseList33={pleaseList33}&dateOf[month]={dateOf:month}&dateOf[day]={dateOf:day}&dateOf[year]={dateOf:year}&youUnderstand=Yes&wouldYou={wouldYou}

    Hope this helps.

    Do get back to us if you have any questions. 

  • EmeraldDonors
    Replied on July 9, 2020 at 11:05 AM

    Thank you!