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

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.

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.


Leave a Reply