Hi Everyone
I don't have experience in JS and Qualtrics support can't help me further.
My survey uses both display logic and embedded data, while my static theme produces a line after each item/question. I have pulled embedded data into the survey and hidden it using ${e://Field/empty}. I've done it this way so I can use both Question and Embedded Data display logic and view these items In Page (the 'In Page' option is removed when attempting to use both question and embedded data logic so the above is a work around).
My problem is that the embedded data still produce lines 2 before the heading, because there are two instances of ${e://Field/empty}. I'd like to hide the lines so there is no evidence of the embedded data item.
In pasting the below preview image, I can now see that the lines appear in Chrome (in between L and R red dots) but not in Edge (another stumbling block for me)
On a community page I have seen the below script suggested to hide a question but I'm not sure where it should go - on the Edit Question JavaScript page or elsewhere? Also is this the right solution?
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery("#"+this.questionId).next(".Separator").hide();
});
Thanks for any advice.
Yes that code would go on the Edit Question JavaScript on the two empty questions.
Thanks for your response Tom. Does the script belong on the 'page loads' or 'fully displayed' section of this page?
https://community.qualtrics.com/XMcommunity/discussion/comment/55666#Comment_55666Hi C_S2020 ,
Copy-paste it as below on the question whose separator you want to hide(i.e. in "fully displayed" section of the page):
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery("#"+this.questionId).next(".Separator").hide();
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Hope it resolves your query!!!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.