Unable to pass data from one form to another?

  • dmichaels
    Asked on March 9, 2016 at 10:33 AM

    I got the form fields to pass to a second form using the Submit button, but can not make it work for a url in a label...When I get to the second form, the fields get filled in with the label name instead of the value.

    The link LOOKS good before you click it (it shows the values), but when it gets to the second form, it's NG

    OBVIOUSLY, it's some small, dumb thing I'm doing wrong.

    https://form.jotform.com/60665692617970

    Thanks,

    David

  • Charlie
    Replied on March 9, 2016 at 10:41 AM

    I am not quite sure if I understand it correctly, could you please provide us more details or a screenshot of the actual problem?

    I made a test submission in your form. Here's a screencast of it. I filled out the name field with "Test Name" and selected "200" in the check boxes.

    Unable to pass data from one form to another? Image 1 Screenshot 20

     

    I was then navigated to this URL http://tbsmahopac.org/online_donations.htm?enterDonation[price]=200&name9=test%20name, it populated the name and the total payment price correctly.

    To learn more about passing one form data to another, you can check this guide: http://www.jotform.com/help/351-How-to-automatically-pass-form-data-to-another-form 

    The only different on that guide is that you are passing to a website where the form is embedded, instead of passing it directly on the 2nd form's URL.

  • dmichaels
    Replied on March 9, 2016 at 11:45 AM

    Thanks for such a quick response.

    If you click Submit, it works great.
    But if you click the hyperlink, it does this:
    Lower down is a pic of what the hyperlink looks like before clicking it

    Unable to pass data from one form to another? Image 1 Screenshot 30Unable to pass data from one form to another? Image 2 Screenshot 41






    ...

  • Charlie
    Replied on March 9, 2016 at 1:08 PM

    Yes it will not, this is because you are using a static "Text" field that does not actually store the value of other fields using their field tags. This is because the "Text" field is not designed to capture an input value.

    One possible way that I can think of is that place that URL link n the "Thank You" message, you'll need to have the form submit for its data value to be printed or captured by your URL.

    May we know how your form should work or its process flow so that we can understand it better? The purpose and functionality of the hyperlink would also help us. We'll wait for your response.

  • dmichaels
    Replied on March 9, 2016 at 1:45 PM
    Thanks.

    The user enters info, including their name and other various items. I want to be able to let them go to another form, in a new window, let them complete that form without re-entering their name, and then return back to the original form to finish.

    Is there any other field that will allow me to build the url (with parameters) like the Thank You page does?

    Thanks,
    David

    ...
  • Nik_C
    Replied on March 9, 2016 at 4:32 PM

    Hi,

     

    Unfortunately, it is not possible to build URL from the form data. As my colleague said, the only option is using custom Thank you page that will redirect to the second form with URL created through the PHP script on your custom thank you page. I wrote the following PHP code for you:

    <?php 

     $name = $_POST["student1"];

     $amount = $_POST["amount"];

     $customUrl= "http://tbsmahopac.org/online_donations.htm?enterDonation[price]=".$amount."&name9=".$name;

     header("Location: ".$customUrl);

    Note: You need to host this script on the web server and set up your custom Thank you page to redirect to your PHP script URL on that web server.

    You have to set custom URL for Thank you page on form submission.

    Unable to pass data from one form to another? Image 1 Screenshot 30

     

    Please take a look at this guide on how you can send post data from Jotform to PHP script that will then redirect to another form.

    When you setup your PHP script you need to make sure that Send Post data is set to yes on your form's preferences:

    Unable to pass data from one form to another? Image 2 Screenshot 41

    Note: This step is also very important because the data won't be sent on submission of form if Send Post data is not enabled.

     

    Please let me know if i can be of more assistance

    Best regards.