What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
PDF Link Generation and pass it to another form through post dataAsked by RogerYelvington01 on March 03, 2017 at 04:51 PM
1. I would like to be able to generate a PDF Link of the form upon submission
2. Instead of sending the link to the email notification, I would like to use post data
3. I would like to have a custom Thank You url form link, that gets filled with the PDF link from the previous form.
>Post the link generated from this form: https://form.jotform.com/51105570784959
>To the Custom Thank you URL, and into the Hidden Text Field Labeled "PDF Link" in this form: https://form.jotform.com/70616540635959
Please advise, thank you!
That's possible with JotForm through post data.
First, you need to enable post data in your form
Then write a custom PHP script that captures the PDF link and then loads it to another form.
After that, you must set the PHP page as the thank you URL of this form https://form.jotform.com/51105570784959.
Alternatively, you can also achieve this without using post data, just the thank you message alone is sufficient.
You can use this for your form:
Where pdfLink is the field name from the second form.
Demo: https://form.jotform.com/70604984390966 (fill this form with your name and the PDF URL will be populated to the second form)
Hope this helps!
Is there anyway that have the PDF link that is generated, sent as post data to a field in the following form? I'm not sure how to write that script.
Also, I'm trying to transfer post data between these two forms, but it is not flowing through, please help - thank you!https://form.jotform.com/51105570784959https://form.jotform.com/70616540635959
I checked your first form and you have enabled post data which is correct, however, you don't have post URL set as thank you URL in your form that captures the data and process it according to your requirements. Basic PHP knowledge is definitely required on this feature.
Anyway, here's a simply PHP script I wrote for you that captures the submission ID and construct the PDF link then prepopulate it to the second form after redirection.
$subID = $_POST['submission_id'];
$pdfLink = "http://www.jotform.com/pdf-submission/".$subID;
$url = "https://form.jotform.com/70616540635959?pdfLink=".urlencode($pdfLink);
Make sure to update the pdfLink field name (bold text above) with the field name in your form.
Hope this helps.
Where do I enter this PHP script?
Also, I've updated the Thank You url to read:
And after submission it produces this link:
But the fields are not being filled in, and to me it looks like all of the field names match?
I made the fields unhidden to show they are not being filled:
P.s. If you Check it, I had to switch the Thank you page back temporarily so the form will still be able to by used by my staff today.
I only want to permanently switch it over when we have the work flow perfected.
Copy the script and save it as a php file e.g. savepdf.php then upload it to your server. Get the link of the file and set it as your form's thank you URL.
Sorry, what is it really that you want? Do you want to use the post data method or just prepopulate the second form through thank you URL redirection? Note that these two methods are different. Post data is the harder way while through thank you redirect is the easiest way to achieve this.
Your link isn't working because of the PDF URL that is not encoded. This breaks the entire query string. You must encode the PDF link first. Here's one that should work for you.
That worked, thank you!
On behalf of Elton, you are welcome.
Feel free to let us know if you have other questions.