Having trouble automatically generating dynamic prepopulation URLs

  • rwaldenjr
    Asked on October 3, 2017 at 10:19 PM

    I apologize that I'm having a brain fart and at a bit of an impasse about trying to automate the creation of these prepopulation URLs so I can send data from my Form 1 registrations to my Form 2 questionnaires. Its not making sense, for some reason! I've tried using the Prepopulate app, but that seems to require manual intervention to create every URL. And, I've tried the Import app. And, while I can download data from my form submissions to an Excel spreadsheet, and use Import to send data back to my JotForm account, I still don't see how to generate a prepopulation URL from that so I can add it to the Thank You page. Are we supposed to use the Import app to generate CSV field names, because it seems to be generating field labels, not names!?!

    I read "Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters", and "How-to-prepopulate-form-with-other-form-values", as well as "How-to-Automatically-Pass-Form-Data-to-Another-Form#_". And, while I have the concept down on how to generate a data-specific URL manually (still not sure why you'd do that, or the application of doing so), I'm somehow missing how dynamic URLs gets created and added to the Thank You page!?!

    All the examples seem like we're creating submission-specific URLs that only pass data from a single Form 1 submission to a duplicate version of that same form. What I'm trying to accomplish is creating a dynamic URL that scrapes input data from any Form 1 submission, and prepopulates the corresponding Form 2 questionnaire. If that's possible, please point out where I'm going wrong and how to accomplish this. I'm missing something here! Also, does the order of input fields have to be identical between Form 1 and Form 2, as in your numerous examples? I need to prepopulate Form 2 with a different layout than Form 1.

    Thanks!

  • Nik_C
    Replied on October 4, 2017 at 2:24 AM

    You can prepopulate any form's fields from any other form as long as the field's nature is the same.


    Of course, you will have to prepopulate name to name, address to address, text-box to text-box field etc.

    And the order of the fields is not important.

    Since you want to prepopulate one form from another, this guide would be helpful: https://www.jotform.com/help/351-How-to-Automatically-Pass-Form-Data-to-Another-Form

    Here are two example forms from the guide:

    Form1: https://form.jotform.com/53541423066955

    Form2: https://form.jotform.com/53542179889977

    You can find step-by-step instructions in the guide on how to prepopulate the form from another form.

    Also, all fields that can be pre-populated are included in the guide for your convenience.

    If you need any further assistance please let us know.

    Thank you!


  • rwaldenjr
    Replied on October 4, 2017 at 3:40 PM

    Thanks Nik! I've read this article numerous times before. And, I'm still not sure I get it!?! If I understand it correctly, even though the examples use specific input data for the fields, the actual URL gets created from the generic field names. Is that correct? That same generic URL will work with any Form 1/Form 2 submission to which it's applied. And, the data-specific URL that is fed to the Autoresponder and Thank You pages (which contains the actual field data from the Form 1 submission) gets created behind the scenes, after clicking the Submit button. If that's how it works, then that explains my hang-up. I thought I had to enter the specific Form 1 data for each field name along with the Form 2 field names in the URL by hand.

    That being said, since the field names don't have to be in any specific order (which is another misunderstanding I had from playing with the Import app for Excel), is there an easy way to obtain field names from a long form without having to manually click every field? I tried using the "Prepopulate" app. But, it seems to identify field labels, not names!?! For lengthy questionnaires like I have, that would be a daunting task to have to touch each and every field on every form!

  • aubreybourke
    Replied on October 4, 2017 at 4:22 PM

    What I suggest is you use the prepopulate app. Generate a URL and examine it so that you can understand how it works.

    Populate Your Form Fields in Advance!

    You will see that the query string ( everything form the ? to the end ) holds variable name/value pairs.

    You can hard code a variable name with a value like this:

    &email=support@jotform.com

    Or you can use JotForm's unique name so that the fields value is assigned to the name.

    &email={email}

    Having trouble automatically generating dynamic prepopulation URLs Image 1 Screenshot 20

    I personally use the prepopulate app to setup the URL first. Then modify the query string to take my unique names instead of what was generated.

    To find the unique name for a field, you need to click on its properties ( blue gear icon ) go to the advanced tab and scroll down. You will see the option to display it under field details.

  • rwaldenjr
    Replied on October 4, 2017 at 4:54 PM

    Thanks Aubrey! So it sounds like even when using the Prepopulate app to get you started, there's still a lot of hand-keying involved to correct what the app gives you. Am I doing something incorrectly with that app? I don't get field names when I run it. I get element labels!?!

    Also, I've been creating a test URL for my "Seller's Inquiry" Form 1 (registration), and "Sellers Questionnaire" Form 2 (questionnaire) forms. However, I notice that there isn't a field ID array for the drop down element. How do I determine those values, or does it automatically select whatever is showing in the window when they click Submit?

  • aubreybourke
    Replied on October 4, 2017 at 5:41 PM

    Thanks Aubrey! So it sounds like even when using the Prepopulate app to get you started, there's still a lot of hand-keying involved to correct what the app gives you. Am I doing something incorrectly with that app? I don't get field names when I run it. I get element labels!?!

    1. Its not correcting, because the app does its job.

    You choose a form and then fill out the form. When you submit the app converts what you typed into a URL with variable name/value pairs.

    So if I type "Aubrey" into say a firstname field, and "Bourke" into a surname field the prepopulate app will generate a query string like this:

    ?firstname=Aubrey&surname=Bourke


    Also, I've been creating a test URL for my "Seller's Inquiry" Form 1 (registration), and "Sellers Questionnaire" Form 2 (questionnaire) forms. However, I notice that there isn't a field ID array for the drop down element. How do I determine those values, or does it automatically select whatever is showing in the window when they click Submit?

    2. Yes that is correct it automatically returns what you select from the list.