JavaScript in Comment in survey | XM Community
Skip to main content

Can someone help me with javascript?
I need to add code in a comment in survey
If question q1 had a score <=6 make this question mandatory, otherwise make optional.

Hi @Aine ,

Could you please explain the requirements for how the score is being calculated? Also, could you confirm if the JavaScript applied is for the same question as q1?


We can use custom validation for this →  Score in Q1 >= 7 OR this question is not empty.


Hello @Shashi 

Ahhh you know that I made several tests with Custom Validation and none of them works, that's why I want to resort to Java script ...
Would you give me an example of how to write the code, 
if the question number 1 <= 6, that this question where I add the code is mandatory???

 

This is the link to how you helped me and the tests I did with custom validation:

Thanks


Hello @Shashi 

I did a last test with what you proposed and it works correctly ... thank you very much


Leave a Reply