Survey-library: goNextPageAutomatic set to true doesn't clear error messages

Created on 14 Dec 2016  路  5Comments  路  Source: surveyjs/survey-library

When survey.goNextPageAutomatic = true; the system doesn't "clean" error messages.

Steps to replicate:

1. set all questions as required
2. try to move to next question without picking an answer (to make the required error appear)
3. click on the required answer (and it will automatically move to the next question)
4. now go back to the previous question...and you'll still see the "required error" with display:block or anyway...visible


using lastest knockout version (0.10.2)

bug

Most helpful comment

@ricricucit @noandrea - It is fixed.

Thank you,
Andrew

All 5 comments

@ricricucit Could you please help me to understand the issue?
I have just created a one page survey with required 3 radio groups and goNextPageAutomatic set to true.
I have pressed the "Complete" button, I've got 3 required errors. After that I have set values for all questions and go automatically to the complete page, as I expected.

Do you want to clean the required error message immediately, after answering the question? I may agree that the current behaviour a little bit confusing. However, the required error should be cleared immediately regardless of gotNextPageAutomatic property value, IMHO.

Thank you,
Andrew

Try to create a survey with, let's say, 5 (required) questions.
For each question:

  1. Click the "next question button" (which will make the requiredError appear
  2. Click one of the responses (which will make you go to next question
  3. Repeat the steps #1 and #2 until you reach the last question
  4. Don't click "complete", but simply go back to "review previous questions" ...and for each of those you'll still see the requiredError shown, although it should have been gone, deleted by point #2...
    As you say, it should be done regardless of goNextPageAutomatic set to true, but that's when it fails clearing the error.

@andrewtelnov to replicate the issue you can do the following:
create a survey page PAGE1
add a radio group to PAGE1 with a required radio group
create a survey page PAGE2
add a radio group to PAGE2 with a required radio group

set the goNextPageAutomatic to true then:

step 1:
on PAGE1 select NEXT (without checking a radio button)
the page will show (correctly) the message that the selection is mandatory,
select an option and you will be sent to PAGE2

step 2:
on PAGE2 click PREVIOUS and you will see that the error message (on PAGE1) is still visible even though an option has been selected.

If the goNextPageAutomatic option is false, after step 2 the error message on PAGE1 is gone .

@ricricucit, @noandrea Yes, thank you! I can see the bug now.

@ricricucit @noandrea - It is fixed.

Thank you,
Andrew

Was this page helpful?
0 / 5 - 0 ratings