Hello Qualtrics Community!
I’m currently working on a survey in Qualtrics that involves Loop and Merge functionality, and I'm trying to conditionally hide a question based on the value of a Loop and Merge field. However, I'm facing some challenge getting it to work as intended.
Here’s what I’ve implemented so far:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#QID119").hide();
var fieldValue = "${lm://Field/3}";
var featuresValue = "${e://Field/features}";
console.log("Field Value:", fieldValue);
console.log("Features Value:", featuresValue);
if (fieldValue === "1" && featuresValue === "multi") {
jQuery("#QID119").show();
}
});
My Current Issue:
- Despite hiding the question initially, it still shows up even when the Loop and Merge value does not match my specified condition.
- I want to ensure that the question remains hidden unless the Loop and Merge value meets specific criteria.
Additional Details:
- The question ID is confirmed to be correct.
- I have tested with hardcoded values for the condition, but it still does not behave as expected.
Questions for the Community:
- Has anyone experienced similar issues with hiding questions based on Loop and Merge values?
- Are there any known pitfalls or best practices I should be aware of when using JavaScript for this purpose in Qualtrics?
Thank you for your help in advance! I appreciate any guidance or suggestions you might have.