I've tried to find a solution on my own, but I'm seeking your input and expertise. As seen in the screenshot I uploaded to Imgur (https://imgur.com/wb4gCFn), when my survey respondents are invited to complete a follow-up survey, each of their medications is first displayed (as well as related dosing and frequency), and one expert (Tom) in this forum helped me implement JavaScript to pre-populate answer choices based on their responses from the first survey that I saved to their contact list entry using embedded data.
Regarding my question and the attached screenshot, if a respondent selects 'Other/Not Listed' from a dropdown (Q7620), a text entry field is pre-populated with the medication name they entered manually the last time they completed the survey. While this works fine, this results in the insertion of a page break when I'd rather have that question remain hidden and the other questions remain on the same screen (i.e., Q7622, Q7623 in the screenshot).
I came across this link https://qualtrics.com/community/discussion/5973/is-there-a-way-to-use-javascript-to-change-the-visibility-of-questions, which I think is along the lines of what I'd like to do (since in-page display logic doesn't let you pull from embedded data).
In the post above, jQuery("#"+this.questionId).hide(); was suggested as a solution, but I'm not sure how to implement this workaround.
Would I add jQuery("#"+this.questionId).hide(); to the question that I want hidden? Relatedly, within this jQuery function, what does "#" get replaced with? Would it be something like this: jQuery("Q7621"+this.questionId).hide();
Thanks in advance!
Best answer by NiC
View original