Have an idea?

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

Show message but then let respondent continue


My client now wants to show that error message, but if respondents insist those are their answers they will be able to continue even though they gave the same score to 9 or more attributes.  

Is this doable?


related to an answer for: Straightliners and displaying a message
asked Nov 12, 2018 by Bryan

1 Answer

+1 vote
We can add a flag to the question to make the custom verification only run once.  Start by adding this to your grid question:

<input type="hidden" id="customErrorFlag" value=""/>

Then the custom JavaScript verification can be wrapped by this:

var flag = $('#customErrorFlag').val();

if (!flag) {
    // normal js verification here...


Just replace line 4 with the original verification.
answered Nov 12, 2018 by Zachary Platinum Sawtooth Software, Inc. (143,625 points)
Thanks again Zachary.  I have added <input type="hidden" id="customErrorFlag" value=""/>  to the HTML <head> Tag and everything seems to be working properly.