Skip to content

Commit

Permalink
changed confirmation message
Browse files Browse the repository at this point in the history
  • Loading branch information
tafakkur committed Jan 14, 2021
1 parent dd9ce0e commit 0319192
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions JavaScript Files/custom message request response.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Qualtrics.SurveyEngine.addOnReady(function(){
const qid = this.questionId;
tot_choices = Qualtrics.SurveyEngine.registry[qid].getChoices().length;
req_choices = 2;
var sel_choices = 0;

that = this;
Expand All @@ -12,10 +12,11 @@ Qualtrics.SurveyEngine.addOnReady(function(){


function check_answers(){
if (sel_choices == tot_choices){that.clickNextButton();}
if (sel_choices == req_choices){that.clickNextButton();}
else{
//Selecting Okay will result in continuing
if (confirm("Custom message here") == true) {
cnf = confirm("You must select ONLY 2 options, you have selected " + sel_choices +".\n Do you still want to continue?" )
if (cnf) {
that.clickNextButton();
}
}
Expand Down

0 comments on commit 0319192

Please sign in to comment.