Question T12285
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Retry after options.showDataSavingError()

Is it possible to stay on the same page while clicking on the complete button when API fails?

created 2 years ago

my requirement is after clicking complete button the form & if API fails i want to stay on the same page.

Show previous comments (4)

    You can see the following code in the example in the ticket I posted:

    JavaScript
    options.showDataSavingError(); setTimeout(() => { //go to the running mode without resetting data and the current page      survey.clear(falsefalse); }, 1000);

    After delay in a second, the survey will go to the last page. You can increase the delay to 5 seconds, for example.

    Thank you,
    Andrew
    SurveyJS Team

      it dosen't work for me

        If you provide us an example that doesn't work, we will take a look. Unfortunately, we can't help you with it, because it works on our side and for other developers.

        Thank you,
        Andrew
        SurveyJS Team