Last active
February 17, 2025 15:07
-
-
Save marketinview/da04721c50f6d8340dacb045069fddb1 to your computer and use it in GitHub Desktop.
Qualtrics: Reset Likert Matrix. Works with single or multi-select matrix. Add button html to question text. #qualtrics #js #jq #matrix #likert #reset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="reset">Reset</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
var qobj = this; | |
var q = jQuery("#"+qobj.questionId); | |
var inputs = q.find(".QuestionBody").find("[type=radio],[type=checkbox]"); | |
q.find(".reset").click(function() { | |
inputs.filter(":checked").each(function() { | |
var parts = this.id.split("~"); | |
qobj.setChoiceValue(parts[2],parts[3],false); | |
}); | |
}); | |
}); |
Hello, this works like a charm! Thanks!
However, I would like to know, if you know, is it possible to not show a reset button but automatically reset whenever a custom error message comes up?
Hello, this works like a charm! Thanks!
However, I would like to know, if you know, is it possible to not show a reset button but automatically reset whenever a custom error message comes up?
Yes, you could trigger it that way.
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See additional Qualtrics solutions at: https://qualtricswiki.tgibbons.com/doku.php