How can I read my default values in my hidden Question in Qualtrics Survey Platform | XM Community
Solved

How can I read my default values in my hidden Question in Qualtrics Survey Platform

  • 29 February 2020
  • 8 replies
  • 231 views

Hi everyone,

I am trying to develop a survey on Qualtrics Platform.

Is there any way where we can read values default values for my hidden Question.

so that while submitting Survey it will not return Null in Data Recorded Values instead expecting it to return default values.
icon

Best answer by TomG 1 March 2020, 15:51

View original

8 replies

Here is link to Full Question i have posted on Stackoverflow

https://stackoverflow.com/questions/60300367/how-to-read-default-choice-values-in-multiple-choice-questions-in-qualtrics-plat
Userlevel 7
Badge +27
If you are hiding your question with display logic then the values will always be blank in the response data. If you want the default values to be recorded, you'll need to hide the question with JavaScript.
Hi @TomG Thanks for your response I am trying to hide Question no 2 on the basis of Question no 1 pre-selected choices(like in below SS if I select any of Choice in Q1 among 10,30,40 except for choice value 20 it should hide Question 2). Can you please help me in setting it via JS as I am fairly new to Platform and JS.

Note:-
It should capture it's values post submission of survey even if question is hidden.

Image for Survey
http://prntscr.com/r9qrxz
Userlevel 7
Badge +27
Add a page break after Q1, then JS for Q2:
```
Qualtrics.SurveyEngine.addOnload(function() {
if("${q://QID1/SelectedChoicesRecode}"!="2") jQuery("#"+this.questionId).hide();
});
```
Note: actual QID and recode value may differ
Hi @Tom_G The Above JS which you posted I have tweak a little according to my use case and I just wanted to Know can I Still Hide Question completely as it is showing Blank Page or Form there but yes choices do get Recorded But I don't want it to appear like below it should hide completely.

JS added-if("${q://QID4/SelectedChoicesRecode}"!="NULL") jQuery("#"+this.questionId).hide();

I just want to hide ques by default so set that parameter on Q28 of mine Survey but it is showing as below while previewing.

Image
prntscr.com/rkzk9k
Userlevel 7
Badge +27
> @DEV_USER said:
> Hi @Tom_G The Above JS which you posted I have tweak a little according to my use case and I just wanted to Know can I Still Hide Question completely as it is showing Blank Page or Form there but yes choices do get Recorded But I don't want it to appear like below it should hide completely.
>
> JS added-if("${q://QID4/SelectedChoicesRecode}"!="NULL") jQuery("#"+this.questionId).hide();
>
> I just want to hide ques by default so set that parameter on Q28 of mine Survey but it is showing as below while previewing.
>
> Image
> prntscr.com/rkzk9k
>

If it is the only question on the page, your JS needs to click the Next button if it hides the question: `this.clickNextButton();`
Hi @TomG The survey is having around 10 Questions and I have added the JS for clicking next button but still, it looks odd when it appears and wait for few sec to click on next button and move to next que and is there any way where we can hide que like we hide the Question during Display Logic.
Userlevel 7
Badge +27
> @DEV_USER said:
> Hi @TomG The survey is having around 10 Questions and I have added the JS for clicking next button but still, it looks odd when it appears and wait for few sec to click on next button and move to next que and is there any way where we can hide que like we hide the Question during Display Logic.

Add a `<div>` to the beginning of the question text with a lot of top padding to push it off the bottom of the page. Add an 'else' to your 'if' to hide the div if you don't click the next button.

Leave a Reply