Drill down next to open text bar | XM Community
Solved

Drill down next to open text bar

  • 26 September 2018
  • 10 replies
  • 97 views

I would like to have a drill down next to a text bar in one question. For example, choose a car from a list of models, and then write a word you associate with that car. Is there any simple way to do this, or any Java code posted somewhere I could build on?
icon

Best answer by TomG 26 September 2018, 20:44

View original

10 replies

Hello @nate99 ,

If you just want drop down list without actual drill down question type then,
You can use side-by-side question type for this and keep one column as Drop down list and other open text
The problem is I want the respondent to select one car from a drilldown list (not a drop down list, I don't want to display all the options, I want them to scroll and select one). Then I want them to write text in one box. When I tried side by side, it seemed to require adding a separate text bar next to every make of auto. Am I missing an option in the side by side approach?
> @nate99 said:
> The problem is I want the respondent to select one car from a drilldown list (not a drop down list, I don't want to display all the options, I want them to scroll and select one). Then I want them to write text in one box. When I tried side by side, it seemed to require adding a separate text bar next to every make of auto. Am I missing an option in the side by side approach?

Sorry, but didn't get the scroll and select part. Also the side-by-side question will be like the image!
Userlevel 7
Badge +27
@nate99,

This probably isn't the answer you want to hear, but you are making this too hard by insisting on one question. The simple answer is to make it two questions - a drill-down followed by a text entry question. It will work much better that way on mobile devices too.
Thank you @TomG, I may follow your suggestion here. And @Shashi, thank you, I see I could make that work if necessary.
Userlevel 3
Badge +11
I second the suggestion of making it two questions. If needed, you can use piped text to carry down the answer from the first question to include in the second question.
Userlevel 7
Badge +27
> @BruceK said:
> I second the suggestion of making it two questions. If needed, you can use piped text to carry down the answer from the first question to include in the second question.

You can only do that if the second question is on a different page. If they are on the same page, you would have to update the second question using a JavaScript event handler.
I have a Side-by-Side question: a combobox column and text entry column.
Is it possible to hide (or disable) the text entry until the "other" option in the combobox is selected on the corrispondent row?
Userlevel 7
Badge +27
> @Mcc said:
> I have a Side-by-Side question: a combobox column and text entry column.
> Is it possible to hide (or disable) the text entry until the "other" option in the combobox is selected on the corrispondent row?

Yes, but you have to write JavaScript to do it.
I solved in this way. I don't know if it is the best way.

Qualtrics.SurveyEngine.addOnReady(function(){
for (i=0;i<43;i++){
var selectName="select[name='QR~QID32#2~"+i+"']";

var preText="[id='QR~QID32#4~";
var postText="~1~TEXT']";
var textName=preText+i+postText;

jQuery(textName).attr('disabled','disabled');

jQuery(selectName).change(function(){
var value=jQuery(this).children("option:selected").val();
var textId=jQuery(this).attr('id').split('~')[2];

if (value==17)
jQuery(preText+textId+postText).removeAttr('disabled');
});
}
});

Leave a Reply