surveyCopyTemplate
public static string surveyCopyTemplate(string token, string surveyID, string NewSurveyName)
Create a new Survey using existing survey Template. Return the ID of the newly created Survey.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string templateID | ID of the existing Template |
| string surveyName | Name which you want to give to the newly created survey |
| Returns |
| string | Returns the ID of the newly created Survey. |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
-
- $surveyLists = $client->surveyTemplateGetList($token);
- $NewSurveyName="Health1 Insurance Survey"
- $NewSurveyId=$client->surveyCopyTemplate($token,$surveyLists[0]['id'],$NewSurveyName);
- ?>