Solved
How to give a "Don't Know" option?
I have a text entry question but want to give the respondents the option to select "Don't Know" instead of filling it out. I don't see a way to do this in the question options at all - any suggestions?
Best answer by AnthonyR
The best way to set this up is to create a multiple choice question with 2 answers, the first will include a text entry, and the second will be Don't know.
Then you can add the following JavaScript to hide the first label, while keeping its text entry box:
Qualtrics.SurveyEngine.addOnReady(function () {
function hideLabel(element) {
if (element.select('input')[0] != null || element.select('textarea')[0] != null) {
element.select('label').each(function (a, b) {
a.hide();
});
} else {
console.log(element);
}
}
var hideLabelsFlag = false
function hideLabels() { //QH.hideLabels() - Hides the label for any answer option where a text input has been added.
var elements = $$('.LabelWrapper');
elements.each(function (name, index) {
hideLabel(name);
});
hideLabelsFlag = true;
}
hideLabels();
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

I'm not sure how much space a text entry field will allow, but it might work??