Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Create a multiple choice question with 1 correct response

Hi Sawtooth users,

I'm wondering if I could get some advice from you gurus. I would like to create  a question that has 1 correct response. I want to use this tool as a way to test participants on the content they're reading and to make sure they have a proper understanding of the content before moving forward in the survey. Sort of like a test question that prevents the respondent from moving forward until they've selected the correct response. While not foolproof, I'm hoping this will decrease the chance that respondents will mindless respond and encourage them to pay attention to the content.

Two things I'm hoping to get feedback on: Is there a way to program the select question to have 1 correct response? Also is there a way to program a warning when an incorrect response is chosen? Any advice on this would be great.
asked Feb 10, 2016 by Oliver

1 Answer

+1 vote
Hi Oliver,

You can do this with custom JavaScript.  Open up the relevant Select question and click the "Advanced..." button near the bottom of the window; then, navigate to the "Custom JavaScript Verification" tab.  In the large text window, you'll want to put something to the following effect:

if (SSI_GetValue("SelectQuestionName") != 1)
    strErrorMessage = "Wrong answer";

You'll need to replace the '1' in my code with the position of the correct answer on the list of response options.  Of course, you can replace the question name and error message with whatever you want them to be.

Hope this helps.
answered Feb 10, 2016 by Zachary Platinum Sawtooth Software, Inc. (206,075 points)
If you're doing this as a multi-select and want to make sure they select your trap option and don't select the others, you'd need to check each answer. Your script would be something like this:

if(SSI_GetValue("SelectQuestionName_1")!=1 && SSI_GetValue("SelectQuestionName_2")!=0 && ...)
     strErrorMessage = "Wrong Answers.";