JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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.
How to post data to WCF service from JotformAsked by jessy_l on April 26, 2016 at 01:42 PM
I have created a WCF Service and want to consume that in the Jot form.
The requirement would be post data from Jot Form to WCF Service.
The service thereby will send the data to a Web API. I tested the WCF Service and am able to post data to the API.
WCF service accepts the input type to be either XML/JSON.
In order to consume the WCF, I tried out the following,
This is the test form I created using Jotform with few fields
Set the Send Post Data in Advanced Settings of Preference to 'Yes'
I am new to php, wrote PHP code to call the method in the service and passed the data
I have put the above Url in the Webhook integration.
Send Post Data - Posts HTTP data to the thank you page.
How do I pass the form data to this WCF service, is it through the webhook or through the thank you page redirection.
Can I have simple example which does this kind of flow.
I found codes lines explaining how data is posted to another JOT form or an html page.
But could find less information on detailed steps.
JotForm POST post data how
There actually two ways on how you can send data via POST method.
Method 1: You can setup a PHP script and add it as your "Thank You" page, you need to enable the "Send POST Data" option in your preferences for this. In this case, you are simply passing the data on your target "Thank You" page which is a PHP script.
For method 1, you can check the following guides:
Send POST Data via your "Thank You" page: https://www.jotform.com/help/213-Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page
Method 2: If you do not want the PHP script to be in the landing page, you can simply add it in the Webhook integration, it does the same with the "Thank You" page, but in this case, the PHP script runs when the form is submitted and the user does not need to be redirected on that page.
Here's a guide that will help you on how to setup send POST Data via Webhook: https://www.jotform.com/help/245-How-to-Setup-Webhook-with-JotForm
If you want to know the exact PHP variables for your form, then you can follow the steps in this guide: https://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page. You can simply see the PHP code variables you need to call in your PHP script to get the submission data.
Now your target PHP script should be connected to WCF, I presume you already have your API? You can simply get the variables then pass it to your WCF using your API.
Here's a sample cloned form that I have: https://form.jotform.com/61165704478965.
My landing page is this PHP script: https://shots.jotform.com/charlie/send-post-data.php
You can view my PHP code here: https://github.com/LightDev777/JotForm-Scripts/blob/master/PHP-Sample-Script.php
I hope that helps.