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 Forms in 123ContactForm
Overview
The following operations allow you to work with forms. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with forms, see Sample configuration.
Operation | Description |
---|---|
Retrieves information about the fields of a certain form. | |
getForm | Retrieves details of a specific form. |
getFormSubmissionCount | Retrieves the submission count for a given form. |
getFormSubmissions | Retrieves details about the submissions of a certain form. |
listForms | Retrieves details of forms. |
Operation details
This section provides further details on the operations related to forms .
Retrieving information about the fields of a certain form
The getFields
operation retrieves information about the fields of a certain form.
<contactform.getFields> <formId>{$ctx:formId}</formId> </contactform.getFields>
Properties
The ID of the form from which fields need to be retrieved.formId:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getFields
{ "apiOutput":"json", "apiUrl":"https://www.123contactform.com", "apiKey":"743401-1438926394-tzsh7xqrgu8a9wb34", "formId":"1540386" }
Related 123ContactForm documentation
http://www.123contactform.com/docs/123contactform-api-retrieve-fields/
Retrieving details of a specific form
The
operation retrieves details of a specific form.getForm
<contactform.getForm> <formId>{$ctx:formId}</formId> </contactform.getForm>
Properties
The ID of the form which needs to be retrieved.formId:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getForm
{ "apiOutput":"json", "apiUrl":"https://www.123contactform.com", "apiKey":"743401-1438926394-tzsh7xqrgu8a9wb34", "formId":"1540386" }
Related 123ContactForm documentation
http://www.123contactform.com/docs/123contactform-api-retrieve-forms/
Retrieving the submission count for a given form
The
operation retrieves the submission count for a given form.getFormSubmissionCount
<contactform.getFormSubmissionCount> <formId>{$ctx:formId}</formId> </contactform.getFormSubmissionCount>
Properties
The ID of the form from which, submissions-count need to be retrieved.formId:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getFormSubmissionCount
{ "apiOutput":"json", "apiUrl":"https://www.123contactform.com", "apiKey":"743401-1438926394-tzsh7xqrgu8a9wb34", "formId":"1540386" }
Related 123ContactForm documentation
http://www.123contactform.com/docs/123contactform-api-retrieve-submissions-count/
Retrieving details about the submissions of a certain form
The
operation retrieves details about the submissions of a certain form.getFormSubmissions
<contactform.getFormSubmissions> <sort>{$ctx:sort}</sort> <formId>{$ctx:formId}</formId> <pageSize>{$ctx:pageSize}</pageSize> <pageNumber>{$ctx:pageNumber}</pageNumber> </contactform.getFormSubmissions>
Properties
The sorting order of the results. Consisting of one of the following values: 'ASC' (oldest → newest) or 'DESC' (newest → oldest).sort:
The ID of the form from which, submissions need to be retrieved.formId:
The number of submissions displayed on one page. Default is 25. When stated explicitly, this must be between 25 and 100.pageSize:
Indicates from which page of results (Starting from 0) need to be displayed. Default is 0 .pageNumber:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getFormSubmissions
{ "apiOutput":"json", "apiUrl":"https://www.123contactform.com", "apiKey":"743401-1438926394-tzsh7xqrgu8a9wb34", "formId":"1540386", "sort":"ASC", "pageNumber":"0", "pageSize":"26" }
Related 123ContactForm documentation
http://www.123contactform.com/docs/123contactform-api-retrieve-submissions/
Retrieving details of forms
The
operation retrieves details of forms.listForms
<contactform.listForms> </contactform.listForms>
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.listForms
{ "apiOutput":"json", "apiUrl":"https://www.123contactform.com", "apiKey":"743401-1438926394-tzsh7xqrgu8a9wb34" }
Related 123ContactForm documentation
http://www.123contactform.com/docs/123contactform-api-retrieve-forms/
Sample configuration
Following is a sample proxy service that illustrates how to connect to 123ContactForm with the init
operation and use the
operation. The sample request for this proxy can be found in the getFields sample request. You can use this sample as a template for using other operations in this category.getFields
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="contactform_getFields" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiOutput" expression="json-eval($.apiOutput)"/> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="formId" expression="json-eval($.formId)"/> <contactform.init> <apiOutput>{$ctx:apiOutput}</apiOutput> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </contactform.init> <contactform.getFields> <formId>{$ctx:formId}</formId> </contactform.getFields> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>