Place the question of a dropdown style question to the left of the dropdown | XM Community
Skip to main content

Hi, I am looking to customize the display of a dropdown question. In the default setting, the question appears above the dropdown. I tried adding the following javascript code to place the question text to the left of the dropdown:
 

Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var id=this.questionId;

jQuery("#"+id).find("Select").before("This is the question text? ");


});

However the dropdown menu is still displayed below the question. Looking for pointers on how to place the question text to the left of the dropdown. Thanks a lot!

Another easy approach would be to use Matrix question with drop down list wherein we can simply put question text in the statement and hide the question text using below JS:

jQuery("#"+this.questionId+" .QuestionText").hide();

 


For single select drop down question, we can use below JS:

	jQuery("#"+this.questionId+" .QuestionText").insertBefore("#"+this.questionId+" .ChoiceStructure").css("display","inline-block");

 


For single select drop down question, we can use below JS:

	jQuery("#"+this.questionId+" .QuestionText").insertBefore("#"+this.questionId+" .ChoiceStructure").css("display","inline-block");

 

This still doesn't seem to work 😞 Could you elaborate on the solution bit more please?

 


Leave a Reply