Have an idea?

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

Require response for select question based on response to numeric question

I have two  numeric questions 'c4dDays' and 'c4dWeeks'.  If a respondent leaves both of those questions blank, is there a way to require a response for the subsequent select question 'c4dSelect'
asked Nov 28, 2018 by kaitlan
Is the select question on the same page as the numeric questions?
Yes, it is on the same page
Also, does the select use radio buttons, checkboxes, or a combo box / dropdown?
radio buttons

1 Answer

+1 vote
Try setting your select question to not require a response, then give the select question this custom JavaScript verification:

if (!$('#c4dDays').val().trim() && !$('#c4dWeeks').val().trim() && !SSI_GetValue('c4dSelect')) {
    strErrorMessage = 'Error message here.';
answered Nov 28, 2018 by Zachary Platinum Sawtooth Software, Inc. (205,575 points)