This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Submissions in JotForm


Overview

The following operations allow you to work with submissions. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with submissions, see Sample configuration

OperationDescription

getSubmission 

Retrieves a specific submission.

updateSubmission

Edits a single submission.

Operation details

This section provides further details on the operations related to submissions.

Retrieving a specific submission

The getSubmission operation retrieves a specific submisson.

getSubmission
<jotform.getSubmission>
	<submissionId>{$ctx:submissionId}</submissionId>
</jotform.getSubmission>
Properties
  • submissionId: The ID of the product which needs to be retrieved.
   Sample request

Following is a sample REST/JSON request that can be handled by the getSubmission operation.

Sample Request for getSubmission
{
	"apiUrl" : "https://api.jotform.com",
	"apiKey" : "f71e12ef09ef7941b8b19b80e5173d26",
	"submissionId" : "310170204341199243"
}
Related JotForm documentation

http://api.jotform.com/docs/#submission-id

Editing a single submission

The updateSubmission operation edits a single submisson.

updateSubmission
<jotform.updateSubmission>
    <submissionNew>{$ctx:submissionNew}</submissionNew>
    <submissionAnswers>{$ctx:submissionAnswers}</submissionAnswers>
    <submissionFlag>{$ctx:submissionFlag}</submissionFlag>
	<submissionId>{$ctx:submissionId}</submissionId>
</jotform.updateSubmission>
Properties
  • submissionNew: The boolean flag to indicate whether the submission is read.
  • submissionAnswers: The array of objects which contain the submission questionIds, answers and field names. Used to map the answers to the questions in relevant fields.
  • submissionFlag: The boolean flag to indicate whether the submission is flagged.
  • submissionId: The ID of the submission.
   Sample request

Following is a sample REST/JSON request that can be handled by the updateSubmission operation.

Sample Request for updateSubmission
{
    "apiUrl": "https://api.jotform.com",
    "apiKey": "7d57b8e152613467b645b5c73b3a0e9",
    "submissionNew": "1",
    "submissionAnswers": [
        {
            "questionId": "3",
            "field": "first",
            "answer": "Disna"
        },
        {
            "questionId": "3",
            "field": "last",
            "answer": "Wijekoon"
        },
        {
            "questionId": "5",
            "field": "area",
            "answer": "15"
        }
    ],
    "submissionFlag": "1",
    "submissionId": "31378868417140229"
}
Related JotForm documentation

http://api.jotform.com/docs/#post-submission-id

Sample configuration

Following is a sample proxy service that illustrates how to connect to JotForm with the init operation and use the getSubmission operation. The sample request for this proxy can be found in the getSubmission sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="jotform_getSubmission" transports="https,http" statistics="disable"
   trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)" />
         <property name="apiKey" expression="json-eval($.apiKey)" />
         <property name="submissionId" expression="json-eval($.submissionId)" />
         <jotform.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
         </jotform.init>
         <jotform.getSubmission>
            <submissionId>{$ctx:submissionId}</submissionId>
         </jotform.getSubmission>
         <respond />
      </inSequence>
      <outSequence>
         <send />
      </outSequence>
   </target>
   <description />
</proxy>