Skip to content

Commit

Permalink
Added Change Question Text on the Page
Browse files Browse the repository at this point in the history
  • Loading branch information
tafakkur committed Oct 24, 2020
1 parent b189b2d commit 3e0d15c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions JavaScript Files/Change Question Text.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This script allows you to change the Question Text based on the choice made.
// There were three choices in the qurestion, and I wanted to change the text of the question, based on what they clicked.

Qualtrics.SurveyEngine.addOnload(function()
{

this.questionclick = function(event,element){
//for a single answer multiple choice question, the element type will be radio
if (element.type == 'radio')
{
var choiceNum = element.id.split('~')[2];
if (choiceNum == 1) {
jQuery("#"+this.questionId+" .QuestionText").html("Please continue and click next when you are done."); // Changes the question text

} else if (choiceNum == 2) {
jQuery("#"+this.questionId+" .QuestionText").html("Please click next to exit or select the other choice if you would like to");

} else if (choiceNum == 3) {
jQuery("#"+this.questionId+" .QuestionText").html("Looking for alternate methods....");
};
};
}



});

0 comments on commit 3e0d15c

Please sign in to comment.