Have an idea?

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

Grid Question

Hi,

I need to design a grid question where we can select multiple answer by column and single answer per raw

For example:

In the columns I have:
1- SEC A
2- SEC B
3- SEC C
4- SEC D

and in raw i have

1 Brand A
2- Brand B
3- Brand C

So if we asked  SEC A and the respondent choose Brand A and Brand B he can't choose them again in SEC A and SEC B

Thanks
Ossama
asked Jan 12 by Ossama Hasan
Is your question direction set to rows or columns?  Does this question use checkboxes or some other input type?
Hi,

it is columns and yes it is check box

1 Answer

0 votes
Try out this custom JavaScript verification:

var rows = $('input[name="hid_row_list_[% QuestionName() %]"]').val().split(',');
var columns = $('input[name="hid_col_list_[% QuestionName() %]"]').val().split(',');

rows.forEach(function(row){
    var count = 0;
    columns.forEach(function(column){
        if (SSI_GetValue('[% QuestionName() %]_r' + row + '_c' + column)) {
            count++;
        }
    });
    if (count > 1) {
        strErrorMessage = 'error message text...';
    }
});
answered Jan 12 by Zachary Platinum Sawtooth Software, Inc. (161,250 points)
multi-select by row
...