Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An Expression Field doesn't display an expression evaluation result when the form or page read-only mode is enabled within a survey JSON definition #9250

Open
JaneSjs opened this issue Jan 2, 2025 · 0 comments
Labels
bug user issue An issue or bug reported by users

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Jan 2, 2025

T21284 - Expression question's value is not visible if the form is in view mode (read-only state)
https://surveyjs.answerdesk.io/internal/ticket/details/T21284


Consider the following demo: View Plunker.

{
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "text",
          "name": "question1",
          "defaultValue": "My Answer"
        },
        {
          "type": "expression",
          "name": "question2",
          "expression": "'Hello World!'"
        }
      ]
    }
  ],
  "mode": "display"
}

When "mode": "display" is enabled within the survey JSON definition, an expression field is empty:
image

However, if you enable the read-only mode using the SurveyModel object instance, the expression displays the result:
image

This issue also occurs when a page's readOnly option is enabled within the survey JSON definition.

@JaneSjs JaneSjs added bug user issue An issue or bug reported by users labels Jan 2, 2025
@JaneSjs JaneSjs changed the title An Expression Field doesn't display an expression evaluation result when the "mode": "display" option is specified within a survey JSON definition An Expression Field doesn't display an expression evaluation result when the form or page read-only mode is enabled within a survey JSON definition Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug user issue An issue or bug reported by users
Projects
None yet
Development

No branches or pull requests

1 participant