Capture data in hidden question | XM Community
Solved

Capture data in hidden question

  • 23 June 2023
  • 7 replies
  • 55 views

Userlevel 5
Badge +11

Hi

We have created an invite outside Qualtrics (screenshot 1). Each button is having a link to the associate button in Qualtrics NPS question.

 

screenshot 1

 

When clicking for example 8 the nps question will show up again in the qualtrics link as 8 being selected.

screenshot 2

 

 

Is there a way to hide the NPS question in survey to avoid showing up in email and survey? It should capture the data.

Display logic = false wont work

 

Could you help please.

icon

Best answer by praveengeorgeix 27 June 2023, 13:49

View original

7 replies

Userlevel 4
Badge +15

Hi @praveengeorgeix,

 

Have you tried autoforward through Qualtrics timer question or javascript at NPS question?

That should do the trick for you.

 

Thanks,

JB

Userlevel 5
Badge +11

I have set auto advance on question checked but it doesnt work.

Is using javascript a better option. If yes could you please help me with the code. Im not familiar with JS

 

Userlevel 7
Badge +27

Try this:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery(this.questionContainer).hide();
}

Qualtrics.SurveyEngine.addOnReady(function() {
if(jQuery("#"+this.questionId+" input:checked").length>0) this.clickNextButton();
});

 

Userlevel 5
Badge +11

Thanks @TomG For some reason the script is not working 

. I tried the jscript for timing from a different page and its working now.

Thanks for your suggestion

 

Userlevel 7
Badge +27

Thanks @TomG For some reason the script is not working 

. I tried the jscript for timing from a different page and its working now.

Thanks for your suggestion

 

You can try delaying it:

Qualtrics.SurveyEngine.addOnReady(function() {
var qobj = this
setTimeout(function(){
if(jQuery("#"+this.questionId+" input:checked").length>0) this.clickNextButton();
},200);
});

 

Userlevel 4
Badge +15

I would suggest adding timer with autoadvance in 0.01 should work.

 

Havent tried it, but I think below change to Tom’s code should also work. 

 

Qualtrics.SurveyEngine.addOnReady(function() {
if(jQuery(".q-checked").length>0) this.clickNextButton();
});

Also, please check the Theme layout you are using. If you are using simple layout, many things may not work.

 

Thanks,

JB 

Userlevel 5
Badge +11

Thanks guys. I got a small code which worked.

Qualtrics.SurveyEngine.addOnload(function() {

    

  /* Place your JavaScript here to run when the page loads */

    

setTimeout(function() {

jQuery("#NextButton").click();

}, 0); /*replace 0 with required milli second*/

});

Leave a Reply