Move text entry to the left of response option in multiple choice question | XM Community
Skip to main content

Hi all,

Could anyone provide java script to move the text entry box to the left (and in-line) with my response options in a two choice multiple choice question

Thanks in advance!

Hello @2024EmmaSteelatUC 

Try below code:

Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
var QID = this.questionId;
jQuery("#"+this.questionId+" .InputText").each(function(){
var QIDOtherLabel = jQuery("#" + QID).find(this).siblings().attr("id");
jQuery(""id='" +QIDOtherLabel+"']").find('span').before(jQuery("#" + QID).find(this));
jQuery(""id='" +QIDOtherLabel+"']").css("padding-top","30px");
jQuery(""id='" +QIDOtherLabel+"']").css("padding-bottom","30px");

});
jQuery("#" + QID).find(".TextEntryBox").css("float","unset");
});

Hope it helps!


Thanks Deepak, yes it worked!


Leave a Reply