The GetFormResults service allows you to recall a list of all the user submitted data for a given form and optionally a given campaign.
SOAP Action: GetFormResults
SOAP Return Object: GetFormResultsResp
The following table describes the parameters used for calling the GetFormResults service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
formId | Y | Integer | The form id |
campaignId | / | Integer | A campaign id |
timestampSince | / | String | Timestamp that marks the beginning of the searchable period |
The following table describes the parameters returned from the GetFormResults service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | / | APIResponseHeader | Header containing authentication information |
errorCode | / | Integer | Numerical value of the error |
errorMessage | / | String | Short literal description of the error |
formResultTypeItems | / | Array of FormResultType | The form data |
formId | / | Integer | The form id |
0 | No error |
---|---|
220 | Authentication error, see header object for detailed information |
221 | Invalid form id |
This examples show the request of all user submitted data for form 123
<?php $header->userId = USER_ID; $header->userToken = USER_TOKEN; $getFormResultsReq->header = $header; $getFormResultsReq->formId = 123; $getFormResultsResp = $SoapClient->__soapCall("GetFormResults", array($getFormResultsReq)); if ($getFormResultsResp->ErrorCode == 0) { foreach ($getFormResultsResp->formResultTypeItems as $formResultType) { foreach ($formResultType->formResults as $formResult) { foreach ($formResult as $key => $vvalue) { echo $key . ":". $value . "<br />"; } } } } else { echo "A list of forms could not be retrieved: " . $getFormResultssResp->errorMessage; } ?>