surveyQuestionCreate
public static string surveyQuestionUpdate(string token,string SurveyID SurveyQuestionStructure surveyQuestionData)
Update an existing Survey Question based on the details provided. Return the ID of the updated Survey Question.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string SurveyID | The array containing the survey question details.
| string question | Questions for which you want to survey. | | string questiontype | Set to following values for different type of answer Options "1" for the "Text" "2" for the "Radio" "3" for the "CheckBox" "4" for the "Dropdown" "5" for the"TextArea" "6" for the"MultiSelect" | | string questionoptions | Number of options for the survey question. | | string answer1 | Answer1 of the question | | string answer2 | Answer2 of the question | | string answer3 | Answer3 of the question | | string answer4 | Answer4 of the question | | string answer5 | Answer5 of the question | | string answer6 | Answer6 of the question | | string answer7 | Answer7 of the question | | string answer8 | Answer8 of the question | | string answer9 | Answer9 of the question | | string answer10 | Answer10 of the question | | string required | Set to 1 if The respondent is required to answer this question else 0 | | string comment | Set to 1 if you want to provide area for comments else 0 | | string other | Allow "Other" option in the Radio Selection set | | string questionid | ID of the question which you want to update |
|
| array surveyQuestionData | The details for the Survey Question |
| Returns |
| string | Returns the ID of the Updated Survey Question. |
- <?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);
-
- $SurveyID='473';
- $surveyQuestionDetail['answer1'] = 'yes';
- $surveyQuestionDetail['answer2'] = 'No';
- $surveyQuestionDetail['question'] = 'Would u like this Product';
- $surveyQuestionDetail['questionoptions'] = '2';
- $surveyQuestionDetail['questiontype'] = '2';
- $surveyQuestionDetail['comment'] = '0';
- $surveyQuestionDetail['questionid'] = '2311';
- $newSurveyQuestionID = $client->surveyQuestionUpdate($token,$SurveyID,$surveyQuestionDetail);
- ?>