Issue with force response and hide choice Javascript | XM Community
Skip to main content
Solved

Issue with force response and hide choice Javascript

  • May 24, 2021
  • 2 replies
  • 65 views

Using a matrix table with a lot of statements, with Javascript we are doing a "hide" or "disable" of statements.

jQuery("#" + statements[i]).parents('.ChoiceRow').hide();
jQuery("#" + statements[i]).parents('.ChoiceRow').find('input').attr('disabled',false)

This works fine! But if the question has a force response option set, then asks for response of hidden statements.

Best answer by ahmedA

Your custom JS and the internal validations are independent of each other.
You can either hide indivudal choices using display logic or enforce force response using custom JS by disabling/hidin next button till all visible options are selected.

2 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Answer
  • May 24, 2021

Your custom JS and the internal validations are independent of each other.
You can either hide indivudal choices using display logic or enforce force response using custom JS by disabling/hidin next button till all visible options are selected.


Yeah! You're right. It's a good workaround enable next button only when all options were selected.