Closed andrewtelnov closed 4 years ago
How to disable the "edit" possibility before sending results? Is there any option like "showPreviewAfterComplete"?
Hi @sovetski, Please refer to my answer at https://github.com/surveyjs/survey-library/issues/7056.
Thanks
Many surveys/forms allow end-users to preview their answers before completing the survey/form. Right now, some of developers use display mode and second survey to create this functionality. We should have it out of the box: Instead of "Complete" button we show "Preview" button. When end-user press "Preview button", we will show all questions, or optionally only answered, in read-only mode on one page (every page converts into a panel with an "Edit" button"). End-user can go to edit mode again, by pressing "Edit" button on a panel to start editing survey again with a particular page or press "Edit" button on Navigation tab to start from the beginning. If an end-user satisfies with results, he/she will press "Complete" button.
New property:
survey.showPreviewBeforeComplete: string
, ["noPreview", "showAllQuestions", "showAnsweredQuestions"], "noPreview" is the default value. New methods:survey.showPreview(): boolean
- go to preview mode, returns false if there is an error on the page.survey.cancelPreview()
- go back to edit mode.The example is here.