Force response with JavaScript | XM Community
Skip to main content
Question

Force response with JavaScript

  • December 4, 2020
  • 3 replies
  • 121 views

I am currently using JavaScript to create in-page display logic for one of my dropdown menu questions. Some of the child questions have a force response validation attached to them. When I try to submit the survey I cannot because a required question is not answered even though it is still hidden by the JavaScript and selections made. Does anyone know a work around using JavaScript to make questions required only when they meet the proper logic and are unhidden and are not required when they are still hidden?

Thanks!

3 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • December 4, 2020

You could try looking at "enable/disable next button" based on your logic.


KWigg
Level 2 ●●
Forum|alt.badge.img+9
  • Level 2 ●●
  • January 22, 2021

I would use custom validation for that, with "is not displayed" for the hidden fields.


Forum|alt.badge.img+11
  • Level 2 ●●
  • February 15, 2021

I had the same problem and solve it by an alternative method. Hiding a question using JS does not mean disable it from being exist. Thus, the validation of that question is still handled by Qualtrics server.
The workaround can be by having a display logic for the questions which are having Force Response or Validation in order to avoid Qualtrics server to validate against that and instead, it should be appeared whenever its required to be answered only.