Clicking on already selected answer does not go to next page with goNextPageAutomatic
See original GitHub issueAre you requesting a feature, reporting a bug or asking a question?
Asking a question or a bug. Not really sure if it’s a bug.
What is the current behavior?
- I created a survey with 2 pages (1 question per page) where all the question types are radiogroup.
- I have set
goNextPageAutomatic
to true(and allowed the next and previous buttons to be visible as well). - In page1, When I choose an answer (say ans1), I automatically go to the next page(page2), which is correct.
- In page2, I click on the previous button, to go back to page1
- Now, I can only go to page2 if I select any other answer apart from ans1. Clicking on ans1, does not automatically go to the next page. Is there a way I can enable this behaviour?
What is the expected behavior?
Clicking on an already selected answer, should automatically go to the next page with goNextPageAutomatic. It is currently not going to the next page.
How would you reproduce the current behavior (if this is a bug)?
Here is the example in plunker.
- Select ans1. It automatically goes to next page.
- Click on previous.
- Select ans1 again. It does not go to the next-page, although it should.
Specify your
- browser: firefox
- browser version: 64.0.2 (64 bit)
- surveyjs platform (angular or react or jquery or knockout or vue): Survey js react
- surveyjs version: 1.0.72
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
JS trigger next button and previous button through selected ...
Hello everyone, I need to add a script at a "yes or no"-question. If a subject clicks yes, the next question should be...
Read more >Whats New - SurveyJS
A survey immediately switches to the next page ( goNextPageAutomatic: true ). Expected behavior: a survey doesn't switch to the next page when...
Read more >survey-knockout - UNPKG
It doesn't reset properties that was changed before and they are not defined ... answering all the questions on a page without pressing...
Read more >Skip pages or questions that have already been answered
After a user has gone through the survey we give them an option to go back to the first page and select more...
Read more >survey.react.d.ts
Action items can be displayed in certain survey elements - in Toolbar (or action bar), ... Goes to the next page if `goNextPageAutomatic`...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For future readers who, like me, also wanted this behavior : here my solution on the
survey-react-ui
package 1.8.71 (also worked onsurvey-react
v1.0.60)I am using the react components, and overrode
SurveyQuestionRadioItem
to tweak things a bit.onChange
callback by anonClick
, this way the callback is called even when the value does not change.Of course you will have to override SurveyQuestionRadiogroup to use your own SurveyQuestionRadioItem, and register it to Survey.ReactQuestionFactory to be used for
radiogroup
questionsThe scenario is this :
When clicking previous to see previously answered questions, it felt weird because the only way to go forward was :
I understand the argument : “the data does not change, hence goNextPageAutomatic does nothing”, but in my opinion it is a bit too strict. A user interaction is a data validation. And buttons should (IMHO) behave consistently when presented multiple times, as much as possible.
Anyway, I love surveyjs, thanks for this great lib.