Question T9148
Visible to All Users

Condition rendering

created 3 years ago

Hello,

I don't know if this is a bug or if we have to specify it every time.

I have a list with checkboxes (question2) which is displayed only if you answer "Yes" to the previous question (question1). So I have a visibleIf condition, which works well

On this list, if I check a box, another question appears (question3).

On the other hand, if I check again no to question1, question2 disappears but question3 remains visible.

Should I create a double condition to say if question1 and question2, or is this a bug? I would find it more logical that if the conditioned question disappears, the conditioned one too

Thank you!

Answers approved by surveyjs Support

created 3 years ago (modified 3 years ago)

Hello Mathie,
The value of question2 was not change after it becomes visible. There are two solutions:

  1. Add additional check to question3
  2. Clear question value on making the question invisible by setting survey.clearInvisibleValues property to "onHidden";
    You can find this property in Survey object, "Data" category.

Thank you,
Andrew
SurveyJS Team