Hi - I have a matrix question that I want to populate with answers using JS code. My code works to set the columns I want to the answers I want. However, when the next button is pressed I get an error "Please answer this question". Interestingly enough I turned off Force Response for the matrix question, and I still get that error. I can make the error go away by setting the answers for each row in the matrix question to column 1. Here's my code: Qualtrics.SurveyEngine.addOnload(function() { // this.getQuestionContainer().hide(); var skillsValue = "${q://QID6/SelectedChoicesRecode}"; var passedQ = "${e://Field/passedQuestion}"; // Qualtrics.SurveyEngine.setEmbeddedData( 'skillsSource', skillsValue); if (skillsValue == "5" && passedQ != "Yes" ) { var that = this; that.setChoiceValue("1", "1", true); // set row 1 column 1 to be the answer that.setChoiceValue("2", "2", true); // set row 2 column 2 to be the answer that.setChoiceValue("3", "3", true); // set row 3 column 3
A newbie to Qualtrics custom code with a request for advice ... even better if someone has a code snippet that is close to what I want ... I have a survey with several matrix single answer likert questions. Depending on a response to a question prior to the matrix question I would like to set the selected answers to the matrix question, ideally without having the survey participant see this being done or need to press the next button. The previous question is a "yes / no" question, so it's recode value for the answer isn't what I'm trying to use to set the matrix question answers. As far as I can tell the only way to do this in Qualtrics is to use JavaScript in the matrix questions. Question #1: Am I correct, or is there another way to get responses recorded for a question the survey participant does not see? I'd like to re-use the JavaScript code code for multiple matrix questions, so hard coding the choiceID, recodeValue, subid, etc. of the matrix questions isn't a good idea. Stu
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.