Solved
Side-by-side matrix with 10 rows - can I show rows only on demand using a button?
I have a side-by-side matrix collecting contact information for up to 10 people. To minimize space, I'd like to set up the matrix to initially show just the first row or 2 and have a button below the table that they can click to "Add another contact" which will display the next empty row of the matrix only when clicked (up to 10 times). I assume this possible with JS, but I'm not sure exactly how. Has anyone done this before?
Best answer by Anonymous
Hello @Nadaly ,
Paste the below code in the Side-by-Side question js(onReady)
var that=this.questionId;
jQuery("#"+this.questionId+" tr.Choice:not(:eq(0))").hide();
jQuery("<input type='button' id='add' value='+' name='+' />").insertAfter("#"+this.questionId+" tr.Choice:last");
jQuery("#add").on('click',function(){
var c= jQuery("tr.Choice:visible").length;
jQuery("#"+that+" tr.Choice:eq("+c+")").show();
});
Note: The above code will work if there is no custom validation on any of the question of the page.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

I'm not sure how to debug this, appreciate any help!!