is there a way to dynamically add more free text boxes in a matrix question | XM Community
Skip to main content

Hi, I am wondering if this is a feature of matrix questions with free text entry. Is there an option for survey respondents to dynamically add more free text entry rows in a matrix question, if for example there are 5 rows in the question, but the respondent has 6 unique entries? 

We cannot have unlimited rows in matrix since we need to specify the max number while programming. Now using JS just show first three rows and hide others, add plus button to show new rows.


Thank you! that is helpful, is there code to get started with hiding other rows and an add plus button to show new rows? 


Thank you! that is helpful, is there code to get started with hiding other rows and an add plus button to show new rows? 

Try using the below code:

var that=this.questionId;
jQuery("#"+this.questionId+" tr.ChoiceRow:not(:eq(0))").hide();
jQuery("<input type='button' id='add' value='+' name='+' />").insertAfter("#"+this.questionId+" tr.ChoiceRow:last");
jQuery("#add").on('click',function(){
var c= jQuery("tr.ChoiceRow:visible").length;
jQuery("#"+that+" tr.ChoiceRow:eq("+c+")").show();
});

 


Thank you! Where would this code go? In the Question Text or the Question Option Response? 


Leave a Reply