Hi
I’m trying to ‘hide’ a matrix table on a preceding checkbox ‘click’ where the responses are either cleared, flushed or reset.
The matrix is a simple grid of various statements under a 5pt likert satisfaction range.
Basically, “click here if you have no experience of X”… and the following matrix table hides.
-------------
Hiding it is not the issue using either Qualtrics Display Logic or JS … but how do I also clear or reset any already-selected radio button responses in the matrix on hide?
This behaviour obviously needs to apply to the toggled list-view of the matrix as well.
Rough working JS below hides just fine, but either I have the find+prop_false line is incorrect or I’m unclear on how Qualtrics manages radio button behaviour.
Qualtrics.SurveyEngine.addOnReady(function () {
function toggleQ3() {
//QID4-1 is the ID of checkbox
//QID3 is the section ID of the question to hide/clear responses
if ($("#mc-choice-input-QID4-1").is(":checked")) {
$("#question-QID3").hide();
$("#question-QID3").find("input[type=radio]").prop("checked", false);
} else {
$("#question-QID3").show();
}
}
toggleQ3();
$("#mc-choice-input-QID4-1").on("change", toggleQ3);
});Can anyone shed light on how to clear radio button responses on a matrix grid on-hide?
Thanks
