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.
Survey Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
string SurveyIDThe array containing the survey question details.
string questionQuestions for which you want to survey.
string questiontypeSet 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 questionoptionsNumber of options for the survey question.
string answer1Answer1 of the question
string answer2Answer2 of the question
string answer3Answer3 of the question
string answer4Answer4 of the question
string answer5Answer5 of the question
string answer6Answer6 of the question
string answer7Answer7 of the question
string answer8Answer8 of the question
string answer9Answer9 of the question
string answer10Answer10 of the question
string requiredSet to 1 if The respondent is required to answer this question else 0
string commentSet to 1 if you want to provide area for comments else 0
string otherAllow "Other" option in the Radio Selection set
string questionidID of the question which you want to update
array surveyQuestionDataThe details for the Survey Question

stringReturns the ID of the Updated Survey Question.

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  11. $SurveyID='473';
  12. $surveyQuestionDetail['answer1'] = 'yes';
  13. $surveyQuestionDetail['answer2'] = 'No';
  14. $surveyQuestionDetail['question'] = 'Would u like this Product';
  15. $surveyQuestionDetail['questionoptions'] = '2';
  16. $surveyQuestionDetail['questiontype'] = '2';
  17. $surveyQuestionDetail['comment'] = '0';
  18. $surveyQuestionDetail['questionid'] = '2311';
  19. $newSurveyQuestionID = $client->surveyQuestionUpdate($token,$SurveyID,$surveyQuestionDetail);
  20. ?>