I have a side-by-side table and one of the columns is a drop down list. If ‘Other’ is selected in the list then I would like the text box in the next column to show. I have multiple rows so would need to work on a per-row basis. Is this possible? I’ve attached an example
Page 1 / 1
Assuming your dropdown values are in 2nd column and open end column is 3rd, option value is 5th.
You can add below JS in Question to achieve the hide or show feature.
Qualtrics.SurveyEngine.addOnReady(function() {
var qid = this.questionId;
var n = jQuery('#' + qid).find('select').length;
// Disable all input elements initially
jQuery('.c10 input').hide();
jQuery('#' + qid).find('.c7').change(function() {
for (let i = 0; i < n; i++) {
var index = jQuery('select.MatrixDL').eq(i).find('option:selected').index();
if (index == 5) {
jQuery('.c10 input').eq(i).show();
} else {
jQuery('.c10 input').eq(i).hide();
}
}
});
});
Hope it helps!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.