Hello !
For a survey, I need to implement, horizontally, two text box with a text between. I searched how to do it with Javascript but did not find any solution. Can somebody help me ?
The idea is that the answer is formatted this way : {Text entry} out of {text entry} and the participant can fill the two text entry box before and after the "out of".
Have a nice day,
Jérémy
Javascript: Text box + text + text box
Best answer by rondev
Try using below code:
var that = this.questionId;
jQuery("#"+this.questionId+" td:not(.ControlContainer)").hide();
jQuery("#"+this.questionId+" .InputText").css("max-width","5em");
jQuery("#"+that+" .InputText:eq(1)").insertAfter(jQuery("#"+that+" .InputText:eq(0)"));
var lang = "${e://Field/Q_Language}";
if(lang=="FR")
jQuery(" sur ").insertAfter(jQuery("#"+that+" .InputText:eq(0)"));
if(lang=="DE")
jQuery(" von ").insertAfter(jQuery("#"+that+" .InputText:eq(0)"));
if(lang=="IT")
jQuery(" ogni ").insertAfter(jQuery("#"+that+" .InputText:eq(0)"));
if(lang=="EN")
jQuery(" out of ").insertAfter(jQuery("#"+that+" .InputText:eq(0)"));
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
