How do I hide the first question after an inline question | XM Community
Solved

How do I hide the first question after an inline question


Userlevel 2
Badge
I want to avoid the first question to be shown after this has been answered via an inline question.
- One approach i read was to use an auto-forward timer, but that conflicts with one of the fraud-detection methods of Qualtrics.
- Another option I tried is to use conditional showing of the question, but that also did not work with this first question

Is there a way to fully hide this first question (which is already answered via inline question), so only the second question is shown on that page?
icon

Best answer by TomG 9 March 2020, 17:05

View original

10 replies

Userlevel 7
Badge +27
Assuming it is a multiple choice question, try:
```
Qualtrics.SurveyEngine.addOnload(function() {
var q = jQuery("#"+this.questionId);
if(q.find("input:checked").length > 0) q.hide();
});
```
Userlevel 2
Badge
Hi TomG - thanks! I tested the script but for reason it seems not to work for the first survey question, with inline question in the e-mail. When trying the functionality on second question (changing the values), it works well. But for some reason my first question remains visible.
Userlevel 7
Badge +27
> @Djurre said:
> Hi TomG - thanks! I tested the script but for reason it seems not to work for the first survey question, with inline question in the e-mail. When trying the functionality on second question (changing the values), it works well. But for some reason my first question remains visible.
>

You added the JS to the first question, correct? Try setting page transition to None and/or addOnload to addOnReady.
Userlevel 2
Badge
Hi Tom, it works 🙂 thank you!

Hi TomG!! Qubie here (Qualtrics newbie lol). I am making my first attempt. I currently have the inline question working but it still populates/shows when the survey opens. It does show the selected response but would love to find a way to move right to Q2. Would you be able to walk me through how to do that?

Userlevel 7
Badge +27

https://community.qualtrics.com/XMcommunity/discussion/comment/40062#Comment_40062Is Q2 on the same page as Q1 or the next page?

TomG Page break after Q1

Userlevel 7
Badge +27

https://community.qualtrics.com/XMcommunity/discussion/comment/40064#Comment_40064Try:
Qualtrics.SurveyEngine.addOnReady(function() {
var q = jQuery("#"+this.questionId);
if(q.find("input:checked").length > 0) this.clickNextButton();
});

TomG admitting before asking, this is a stupid question but...where do i put the code? In the body of the invite?

Userlevel 7
Badge +27

https://community.qualtrics.com/XMcommunity/discussion/comment/40067#Comment_40067Add JavaScript to Q1.

Leave a Reply