Hi,
I've seen many questions asked before that deal with Display Logic within a same page, but nothing particularly seems to address my issue. Basically, I have eight questions with two text entry boxes in each. I start off presenting the first of these questions, and have the remaining seven on the same page with Display Logic to the question immediately preceding it. So I simply want the eight questions to appear one at a time and in order, below each other on the same page as the respondent successively answers each one.
However, Qualtrics' built-in "In Page" functionality for display logic sadly does not work for text entry questions. So I'm left with each question appearing on a new page (which is not desirable for timing and general experience of filling out the survey), or attempting to make the Display Logic work myself through Javascript. But because usually, responses to questions can't easily be accessed until a page has been submitted, I'm imagining that the process to get this to work might be slightly non-trivial, specially since each question is indeed its own question in Qualtrics.
Ideally, I would simply have something like `jQuery("#"+this.questionId).hide();` on each question, and simply once the respondent has entered any response on the two text entry boxes of the question immediately preceding it (my condition is basically that the response be a number greater than 0), the question would appear, and so on for all eight questions. But I'm not sure how to access the text answers for one question in the Javascript for another question (I've tried Inspect to get an ID for the text entry boxes but I'm not sure if simply using a condition like ` jQuery(".ID").val()>0` (parsing as integer if necessary) would work (where ID is replaced with the relevant id for the text entry boxes), since each of my questions are on separate Qualtrics questions. Another alternative I could think of was to have some sort of event listener or timer that for some interval would check if the text entry boxes for the preceding question have been filled in (would using getChoiceAnswerValue from the Qualtrics Javascript API work?) to then show the new question, but I'm not sure if any of that is feasible either. Just in case, in order to randomize some things myself, I am using a matrix for these text entry questions.
Any help would be greatly appreciated! I'm at a bit of a loss here with this.
Page 1 / 1
If you are looking to apply display logic on some question from a text entry question, you can apply display logic as "non empty" as like below:-
!
!
@bansalpeeyush29 said:
> If you are looking to apply display logic on some question from a text entry question, you can apply display logic as "non empty" as like below:-
> !
>
Thanks for your response! Unfortunately, I had tried that, since my condition is not dependent on the actual answer but just that something has been entered into the box. For some reason though, the "In Page" box still can't be selected in the Display Logic.
I'm being told that "In Page Display Logic may be incompatible with Response Validation" and also that it may be incompatible with Forced Responses, but I've turned both of those off to check and nothing seems to work. When I make a simpler set of questions and try to make the logic conditional on a text entry, I'm told "(In Page Display Logic is unavailable since you are using an incompatible question type: Text Entry)", so I'm led to believe that the issue is the the text entry question type (it seems in your screenshot maybe the question the condition is based on was just a Descriptive Text question?).
See explanations I get below, where Q112 is the matrix type question with the text entry boxes, and I'm pointing specifically to the boxes I want to make sure are filled in before the next question is displayed:
!
!
> If you are looking to apply display logic on some question from a text entry question, you can apply display logic as "non empty" as like below:-
> !
>
Thanks for your response! Unfortunately, I had tried that, since my condition is not dependent on the actual answer but just that something has been entered into the box. For some reason though, the "In Page" box still can't be selected in the Display Logic.
I'm being told that "In Page Display Logic may be incompatible with Response Validation" and also that it may be incompatible with Forced Responses, but I've turned both of those off to check and nothing seems to work. When I make a simpler set of questions and try to make the logic conditional on a text entry, I'm told "(In Page Display Logic is unavailable since you are using an incompatible question type: Text Entry)", so I'm led to believe that the issue is the the text entry question type (it seems in your screenshot maybe the question the condition is based on was just a Descriptive Text question?).
See explanations I get below, where Q112 is the matrix type question with the text entry boxes, and I'm pointing specifically to the boxes I want to make sure are filled in before the next question is displayed:
!
!
> @DRRTGCC said:
> Ideally, I would simply have something like `jQuery("#"+this.questionId).hide();` on each question, and simply once the respondent has entered any response on the two text entry boxes of the question immediately preceding it (my condition is basically that the response be a number greater than 0), the question would appear, and so on for all eight questions. But I'm not sure how to access the text answers for one question in the Javascript for another question.
Hi @DRRTGCC,
you cold access the next question using its id. I got stacked with something similar with multiple choice questions. I wanted to display the latter question based on the actual answer of the first one. My code might help you to implement yours.
> Ideally, I would simply have something like `jQuery("#"+this.questionId).hide();` on each question, and simply once the respondent has entered any response on the two text entry boxes of the question immediately preceding it (my condition is basically that the response be a number greater than 0), the question would appear, and so on for all eight questions. But I'm not sure how to access the text answers for one question in the Javascript for another question.
Hi @DRRTGCC,
you cold access the next question using its id. I got stacked with something similar with multiple choice questions. I wanted to display the latter question based on the actual answer of the first one. My code might help you to implement yours.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.