Picture of Rob Mausser
showValidationError apply only to item not entered
by Rob Mausser - Friday, 18 June 2021, 6:03 PM

showValidationError, which is triggered by onCannotSubmit from the core questionview.js, creates a red box around any question component items that are not submitted.

However, some question components, like textinput and matching, allow for multiple items.

When only SOME of the items are answered, the showValidationError applies a red box to ALL items, even the ones that were indeed correctly answered.

Is there any way to apply a specific ID or something to each item, so that showValidationError can call out that specific input field, rather than showing all items as unanswered? Technically its wrong to say to the user in a form "Hey, you didnt answer these highlighted items" when in fact they did.

Our client thinks it might lead a person to change their already entered answer, thinking its wrong.