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

Move text entry to the left of response option in multiple choice question

  • 4 March 2024
  • 2 replies
  • 32 views

Badge +1

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!

icon

Best answer by Deepak 4 March 2024, 06:48

View original

2 replies

Userlevel 7
Badge +36

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!

Badge +1

Thanks Deepak, yes it worked!

Leave a Reply