Adding withdarw button | XM Community
Skip to main content

I have added java script, to have a withdraw button at the end of each page. The purpose is that if participants want to withdraw from the study, they can click the button. When participants click the buttons, a question with three options should come up. The withdraw button shows up at the bottom of each screen, but it's not clickable and doesn't pop up the question.

I have added the following code:

Qualtrics.SurveyEngine.addOnload(function() {
$(this.question._$separator).hide();
$(this.questionId).hide();
var that = this;
var endBtn = document.getElementById("EndNow");

function skip() {
    that.setChoiceValue(1, true);
    that.clickNextButton();
};

endBtn.addEventListener("click", skip);
});

@zaink This is only the JS, what’s your button looks like. Are you adding the button code at footer?


Make sure you are adding the button first and then adding events on it.


Leave a Reply