Browse Article by TopicsSend Post Send Data POST Thank You Redirect URL encode decode redirect url custom page web page
- Adding a Form to a Web Page
- Redirecting Users to a Different Page
- How to Clone an Existing Form from a URL
- Adding a form to Web Page Maker
- How to Post Submission Data to Thank You Page
- Add a form to your Posterous blog
- Prepopulating Fields to Your JotForm via URL Parameters
- How to Know which Page or Form the Submission Came From
- Create a Custom Thank you page with Auto-redirect
- How to Strip Headers from Postal Addresses in Email Alerts
Related Forum Questions
- Why conditional redirect to URL after submit says "server not found"
- Custom Thank You URL by conditional logic is not working
- Why doesn't the thankyou appear on the screen after a form is submitted? All I see is a message to create a jotform.
- Conditions: Change Thank You page URL is not working
- HIPPA Compliant Forms
- HIPPA Compliant
- How can I transfer submission data to our newsletter provider?
- Delete personal info
- Conditions: Conditional redirect does not work and redirects to a blank page
- Conditions: Not able to redirect to a specific URL based on conditions
Send Submission Data via Post Method and Thank You SettingsLast Update: March 6, 2017
We are very familiar of the feature in Prepopulating the fields to your JotForm via URL Parameters wherein the form always receive the parameter data. With this feature, form fields are automatically given default values when a URL address to the form with included parameters is clicked.
What if you wanted to send the parameter data instead? And the target page is not a JotForm form?
Example a: You can simply send the data via the URL parameter as mentioned in the link first shared above, you can also check this link to a guide that allows you to send data to another URL by prepopulating the target URL parameter from the form fields of form #1.
Example b: We want to send the form field data to a target PHP script via POST method, this will NOT append the data in the URL parameter, which makes this method more secure.
Being able to directly send the information from JotForm form into your own website or PHP script, provides a lot of flexibility in collecting data and as well as enhancing user's experienced since you are using your own custom web pages with JotForm.
This tutorial will show how to send submission data via POST method and using the "Thank You" settings.
This JotForm feature uses the POST request method which requires PHP scripts.
PHP is required to be supported and enabled on the web server of the custom page.
The tutorial is divided into 2 parts.
Part 1 : Creating the Forms
Part 2 : Creating the custom PHP page
Part 1 - Creating the form:
1. Login to JotForm and create the form in the form builder.
2. To complete the form, enable the Send Post Data feature of the form.
Just click SETTINGS at the top > FORM SETTINGS on the left > click SHOW MORE OPTIONS > scroll down and look for the SEND POST DATA option > then select YES.
For users who are still using V3, click on Preferences.
Navigate to "Advanced" tab and click "Show More".
Here, enable the "Send POST Data", select "Yes" in the drop down option.
Click the "Save Changes" button.
3. When satisfied with the form, use the "Thank You" Wizard to add the URL address of the target PHP script.
To set this up, click SETTINGS at the top > THANK YOU PAGE on the left > tick the REDIRECT TO EXTERNAL LINK option > then paste the path to your PHP script.
And for V3 users, click on the Thank You button.
4. Click on "Redirect to external link" and paste the path of your PHP script there.
5. Click the "Save Changes" button to apply the changes made.
Note : The URL address should be the PHP page that exists in your website (this is the page created in Part #2 of this tutorial)
6. Click Finish to save and close the wizard.
7. Save the Form.
8. Preview and Test the form.
Part 2 - Creating the Custom PHP Page
The URL entered in the "Thank You" wizard's redirect to external link should be able to fetch PHP tags.
1. Start creating your PHP web page using your editor (any text editor will do)
2. For the purpose of this tutorial, follow or copy the describe PHP scripts found on this guide.
3. Save the PHP page as redirect.php or you can name it anything that you like, it should at least have an extension of .php as a file.
4. Make sure it is deployed and located in your website with the correct URL address that was similarly used in step #4 in the Part 1 of this tutorial.
Example: The URL address provided in the form's Thank You page in my case is:
5. To fetch the data from the POST method. You need to know the correct PHP tags of your forms. You can get your fields PHP code by following this guide: https://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page
Example is this form: https://form.jotform.com/63143715707960. The PHP code or tags for my fields are listed which are the following:
Now in your PHP script, you can simply use those to fetch the data and use it as your own.
Important: It is quite necessary that you have knowledge with PHP on this case to fully utilize and implement this. I suggest checking the links below to help you get started.
Cases where you can implement this tutorial:
1. You want to save the information submitted directly on your database. There's a specific guide about this here: How to send submission data to your MySQL database using POST method and PHP
2. You want to pass data to another page or script but you don't want it to be populated in the URL itself.
3. Pass data to a 3rd party application that accepts POST data.
I hope that helps. Feel free to comment below if you have questions or concerns, or you can also open a new thread in our forum page.