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

Questions inside a panel are divided between different pages in question-per-page mode #9557

Closed
SamMousa opened this issue Mar 5, 2025 · 7 comments · Fixed by #9590
Closed
Assignees
Labels
enhancement user issue An issue or bug reported by users v1 v2.0

Comments

@SamMousa
Copy link
Contributor

SamMousa commented Mar 5, 2025

Describe the bug
Before the big rework questions inside a panel were always shown on the same page. Since the rework they no longer are.

Steps to reproduce
https://surveyjs.io/published?id=70a80007-8ca6-4d68-99cd-c25564b365d5

{
  "title": "panel bug",
  "logoPosition": "right",
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "panel",
          "name": "panel1",
          "elements": [
            {
              "type": "checkbox",
              "name": "V003a",
              "choices": [
                "1",
                "2",
                "3"
              ]
            },
            {
              "type": "checkbox",
              "name": "V003b",
              "choices": [
                "1",
                "2",
                "3"
              ]
            }
          ]
        }
      ]
    }
  ],
  "questionsOnPageMode": "questionPerPage"
}

Expected behavior
Panels are often used to create a kind of "composite" questions, it makes no sense to split them across multiple pages. Furthermore this is an undocumented (and I expect unintentional) change of behavior

@JaneSjs JaneSjs added the user issue An issue or bug reported by users label Mar 5, 2025
@JaneSjs JaneSjs self-assigned this Mar 5, 2025
@JaneSjs
Copy link
Contributor

JaneSjs commented Mar 5, 2025

Hi @SamMousa,
Thank you for sharing this demo survey.

{
  "title": "panel bug",
  "logoPosition": "right",
  "pages": [
    {
      "name": "page1",
      "elements": [
        {
          "type": "panel",
          "name": "panel1",
          "elements": [
            {
              "type": "checkbox",
              "name": "V003a",
              "choices": [
                "1",
                "2",
                "3"
              ]
            },
            {
              "type": "checkbox",
              "name": "V003b",
              "choices": [
                "1",
                "2",
                "3"
              ]
            }
          ]
        }
      ]
    }
  ],
  "questionsOnPageMode": "questionPerPage"
}

From what I gather, even though you enable the questionsPerPage mode, you expect that panel questions appear within the same panel rather than on separate pages?

@SamMousa
Copy link
Contributor Author

SamMousa commented Mar 5, 2025

Correct, this used to be the behavior; and I also think it makes sense.

@JaneSjs JaneSjs removed their assignment Mar 5, 2025
@andrewtelnov
Copy link
Member

@SamMousa If we decide to work with a "panel" like with a "question" then it should be another mode, "elementPerPage".
We are working on another mode: "inputPerPage", where one input is per page. For example matrix with 3 columns and 4 rows will be displayed on 12 pages, one question cell per page.
It was requested a lot.
Do you really have this scenario with panels?

Thank you,
Andrew

@SamMousa
Copy link
Contributor Author

For us this is the primary use case: questionPerPage where matrix and panel etc are NOT split. We are currently unable to upgrade because this feature was broken / changed.

I'm open to the arguments for the change, but it really isn't a minor change when the behaviour of all our surveys change 😅

@andrewtelnov
Copy link
Member

@SamMousa That is true. I will take a look and see what we can do here. If there will be not many changes we could implement this functionality in a week or two.
I will be back. I need to try it to see how many code has to be changed.

Thank you,
Andrew

@SamMousa
Copy link
Contributor Author

If it cannot be resolved we will not be able to upgrade, which means we'll have to fork (and we do not have the resources or required skills for that) so I really hope you find a solution!

Thanks for your efforts

@andrewtelnov
Copy link
Member

@SamMousa We decided to revert the previous behavior. We will may add an option if somebody complains.
We will have to add just couple lines of code to make it optional, but for now decided do not do it.

Thank you,
Andrew

@RomanTsukanov RomanTsukanov changed the title [QuestionPerPage] Questions inside a panel are no longer shown on the same "page" Questions inside a panel are divided between different pages in question-per-page mode Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement user issue An issue or bug reported by users v1 v2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants