Have an idea?

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

require response for one of 2 numeric questions

I have a question asking people to enter their height in meters or centimeters with a separate box for each

How can I require them to enter their height in one of the two boxes
asked Mar 6, 2019 by anonymous

1 Answer

+1 vote
Adding this custom JavaScript verification to one or both of the numeric questions will cause the error message to appear if both inputs are left empty:

if (!SSI_GetValue('NumericQ1') && !SSI_GetValue('NumericQ2')) {
    strErrorMessage = 'Both questions cannot be left empty';

"NumericQ1" and "NumericQ2" must be replaced with the names of the two numeric questions.
answered Mar 6, 2019 by Zachary Platinum Sawtooth Software, Inc. (206,100 points)