Have an idea?

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

Custom Drag Drop Query

Hi Everyone,

I'm using the custom drag-drop ranking setup from the Sawtooth question library.


I've a total of 6 items and the last option is the Other specify box. I want the first 5 options to be mandatory (should be ranked) but keep the other option optional i.e.  - the respondent should always rank the first 5 options but can skip without ranking the other box. Please let me know if there is a way to achieve this.

asked Apr 10, 2021 by Vinay Agrawal Bronze (1,595 points)
You can set the minimum number of responses to 5 and then add custom JavaScript verification if each of the first 5 items is <1 to trigger the error message.

2 Answers

0 votes
This question in the question library is a modification for the drag and drop ranking to include other specify.  Perhaps this can help?

answered Apr 11, 2021 by Jay Rutherford Platinum (50,145 points)
0 votes
Like Jay said, custom JavaScript verification should be able to handle this.  In the ranking question's verification, you should see chunks of code labelled "Unanswer fake responses" and "Number ranked."  Between these two chunks, please try adding this script:

// Require responses for item 1 - 5
for (var i = 1; i <= 5; i++) {
    if (!SSI_GetValue('[% QuestionName() %]_' + i)) {
        strErrorMessage = 'Error message...';
answered Apr 12, 2021 by Zachary Platinum Sawtooth Software, Inc. (205,575 points)