Have an idea?

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

Require checking for multiple columns in grid

I'm working on a grocery question. It is set up as a grid with Departments as the rows and columns Visited and Bought From.

Is there a way to make sure that if respondents selected that they Bought From a department that they must also select Visited before moving ahead?
asked Oct 11, 2018 by anonymous

1 Answer

0 votes
Try this custom JavaScript verification:

$('input[name=hid_row_list_[% QuestionName() %]]').val().split(',').forEach(function(row){
    if (!SSI_GetValue('[% QuestionName() %]_r' + row + '_c1') && SSI_GetValue('[% QuestionName() %]_r' + row + '_c2')) {
        strErrorMessage = 'Error message here.';
answered Oct 11, 2018 by Zachary Platinum Sawtooth Software, Inc. (121,625 points)
Thanks, Zachary!