Have an idea?

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

At least one answer for Open Question In Grid

I have create a Open question in grid with 5 rows. I want to allow respondent can answer at least one row. Not require all.

How can I do that?
asked Jul 23 by Saroeun Bronze (2,715 points)

1 Answer

0 votes
Best answer
Set each row to not require a response, then give the question this custom verification:

var rows = $('input[name="hid_row_list_[% QuestionName() %]"]').val().split(',');
var columns = $('input[name="hid_col_list_[% QuestionName() %]"]').val().split(',');
var answered = false;
for (var r = 0; r < rows.length && !answered; r++) {
    for (var c = 0; c < columns.length && !answered; c++) {
        answered = SSI_GetValue('[% QuestionName() %]_r' + rows[r] + '_c' + columns[c]);
if (!answered) {
    strErrorMessage = 'error message...';
answered Jul 23 by Zachary Platinum Sawtooth Software, Inc. (184,925 points)
selected Jul 24 by Saroeun