Hi all,
I have a text entry form, and would like to have it start with just two rows but then automatically add a new row as soon as the previous row is filled out. For instance, as soon as someone writes in the 2nd row, a 3rd row appears. Then when that person writes on the 3rd row, a 4th row appears. And so on.
As a foundation, I'm starting from the following JS from THIS post:
var that=this.questionId;
jQuery("#"+this.questionId+" tr.Choice:not(:eq(0))").hide();
jQuery("").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();
});
Two questions:
1) The above code is written for a Side-By-Side question type. How do I change this (a) to work for a Text Entry Form question type? and (b) to make it based on the entry field not being empty (i.e., participants have typed in)? It's currently based on a choice/selection in the Side-by-Side.
2) (ideal but not necessary) Is there a way to do this automatically rather than force users to press a
+button?
Thanks so much! I know only minimal JS, so your help is much appreciated.