question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When posting to server on complete event, go back to edit mode if an error is returned

See original GitHub issue

I’m posting survey.data to my server api on complete, at which point the complete message get’s displayed by surveyjs and the survey disappears.

If the server return an error or if there is a network issue or something similar, is there a way to go back to the survey instead so the user can try the “Complete” button again?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewtelnovcommented, Apr 23, 2017

@emerbrito Sure, you may use the following code:

//Parameters: clearData: boolean = true, gotoFirstPage: boolean = true, make them all false
survey.clear(false, false);
survey.render();

However, I would suggest you to write an error message, above/under a survey that something goes wrong and ask to resubmit the data by pressing a button. In this case your users know what is going on.

Thank you, Andrew

0reactions
andrewtelnovcommented, Jun 20, 2017

@avium Yes, we have it in our TODO list. I will likely work on it on this or next week.

Thank you, Andrew

Read more comments on GitHub >

github_iconTop Results From Across the Web

When posting to server on complete event, go back to edit ...
I'm posting survey.data to my server api on complete, at which point the complete message get's displayed by surveyjs and the survey ...
Read more >
How to keep a row edit-mode after getting error in ASP.NET ...
4) The user click "Add New" button and add a new row. The row changes to 'Edit' mode, fill all fields and choose...
Read more >
Keep editing after a server side error in Kendo UI for jQuery
Hello, i want to be able to continue editing/inserting a row after a server error, and maintain the data already inserted. Is it...
Read more >
Error handling - Apollo GraphQL Docs
You can edit Apollo Server error details before they're passed to a client or reported to Apollo Studio. This enables you to omit...
Read more >
Form Editing - jqGrid
This event fires immediately after all actions and events are completed and the row is inserted or updated in the grid. afterComplete :...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found