How to prevent survey submissions based on one of the answer choices, if selected ? | XM Community
Skip to main content

Hi folks, I have a use case, where we have one multiple choice question and 5 answer choices. (Answer choices are - yes, no, inconsistent, snooze, not applicable)

If someone selects a “snooze” button answer choice then the survey taker should not be able to submit the survey until and unless the survey taker changes the answer choice from snooze to something from the remaining 4 answer choices i.e., yes, no, inconsistent and not applicable. Is there a way to achieve this in Qualtrics via JavaScript or any out of the box functionality? Please guide !

We can use custom validation on the multichoice question and show error message acoordingly.


Hi Shashi, basically, I want the survey taker to be able to navigate to the end of the survey but if snooze option is selected, then he/she should not be able to submit the survey. Unfortunately, the custom validation does not help me as I cannot proceed to further questions of the survey if the custom validation fails. Here, I want the survey taker to be able to proceed till the end of the survey but should not be able to submit the final survey if he/she has selected the “Snooze” answer choice for any of the questions asked in the survey. Is there a JavaScript available for it ?


@adityadave1810,

You can add survey flow or display logic at the end of the end of survey to do something if they have answered ‘Snooze’ to any questions. You could display a message and disable the next button. It isn’t clear what you envision should happen at that point.


Hi TomG, thanks for the revert. Basically, I want to disable “submit survey” button if “snooze” option is selected as one of the answer choices for any of the questions. So, we want to let the survey taker know to unsnooze the answer choice (i.e., unselect snooze option) and select any other answer choice (other than snooze) in order to submit the survey. The survey should not be allowed to submit if someone has selected “snooze” option. Was I able to make myself clear ? any suggestions ?


Hi TomG, thanks for the revert. Basically, I want to disable “submit survey” button if “snooze” option is selected as one of the answer choices for any of the questions. So, we want to let the survey taker know to unsnooze the answer choice (i.e., unselect snooze option) and select any other answer choice (other than snooze) in order to submit the survey. The survey should not be allowed to submit if someone has selected “snooze” option. Was I able to make myself clear ? any suggestions ?

Assuming they can get back to the question to un-snooze it somehow, you can add a text/graphic question at the end of survey that is only displayed if ‘Snooze’ is selected. Add JS to that question to disable the Next button:

Qualtrics.SurveyEngine.addOnReady(function() {
this.disableNextButton();
});

 


Leave a Reply