
Solved
Can I pipe answers from a previous question into a Matrix Table
We are asking a Matrix table question and we want to pipe the answers from a previous question into the body of the matrix table; so the piped text sits next to the answer fields as a reminder of what they wrote previously. I have attached a screenshot of what it should look like.
There would be 7 columns in the table (excluding the choice labels) Four of the columns would contain piped text (Total, Previous Question A, Previous Question B, Previous Question C) and three columns for inputting data (Current Question A, Current Question B, Current Question C).
I'm hoping there is a javascript solution to this?
!

Best answer by Peter_Furness
I figured out how to do it using this thread
https://www.qualtrics.com/community/discussion/comment/1506#Comment_1506
The key code for piping into the first column is as follows:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var $jq = jQuery.noConflict(); // initiation of new variable to avoid conflict
/* Col 1 with text */
var $arr5 = ['${q://QID3/ChoiceTextEntryValue/1}','${q://QID3/ChoiceTextEntryValue/2}','${q://QID3/ChoiceTextEntryValue/3}','${q://QID3/ChoiceTextEntryValue/4}','${q://QID3/ChoiceTextEntryValue/5}']; // this is the array for text to be shown in column 1 you may add text change text
$jq('.c4').not('th').each(function(i){
$jq(this).html($arr5[i]);
});
});
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.