Question T22662
Visible to All Users

Questions in a Hidden Page Still Considered Visible in survey-core

created 8 days ago

Hi,

We've observed that when a page is hidden—whether by a condition or not—its questions are still considered visible.

Please find attached an example survey.json illustrating the issue:

  • Page 1 (Visible) – Question correctly considered visible

  • Page 2 (Hidden) – Question incorrectly considered visible

  • Page 3 (Visible, but with a hidden panel) – Question incorrectly considered visible

The output.png file shows the result from getPlainData() of the survey-core JS package.
The code.png file shows how we use it in the implementation.

Could you please solve this so that questions are correctly considered hidden when their page is hidden?

Thank you.

Regards,
Ayman

Comments (3)

    Hello Ayman,
    The data object contains the actual property values of the survey questions. However, in your survey, question2 and question3 are not visible, not because their visible property is set to false, but because their containers are hidden. As a result, the data will still show visible: true for these questions.

    Could you please provide more details about your use case?

      Hi Jane,

      Thank you for your prompt response.

      I would like to know if a question was visible to the user.
      For example, questions2 and questions3 are invisible due to their container, which makes them invisible to the user.

      Is there a method to check whether a question was (really) visible to the user (visible property doesn't help in our case)?
      Or at least, a method to check whether a page was visible to the user?

      Thank you,
      Ayman

        Hello Ayman,
        You may check the visibility of a question's parent container using the question.isParentVisible property.

        Let me know if this option works for you.