Question T21946
Visible to All Users

Only Partial Data Returned on Form Submission in Preview Mode

created 6 months ago

Hi SurveyJS Team,

I am facing an issue with my SurveyJS form. When I click the "Preview" button and submit the form, I only receive a piece of the information I entered on the form, not the whole JSON payload.

For your reference, here is a CodePen link:

https://codepen.io/pen?editors=1111

Please do not fill out the entire form. At the end, you will notice that only the filled data is shown, not the complete form data.

Thanks in advance for your help!

Amit V

Answers approved by surveyjs Support

created 6 months ago

Hi,
To display all questions (filled in and empty ones) in a survey preview section, set the SurveyModel.showPreviewBeforeComplete property to "showAllQuestions".

Let me know if it helps.

    Show previous comments (3)

      Hi Amit,
      If you wish to include empty question answers when users are testing surveys in a form builder, you can obtain a previewed survey and override the survey.onComplete function to add empty question answers to the resultant response.

      Please let me know if you have any additional questions or requirements regarding this usage scenario.

        Hi Jane,

        I would like to report an issue with choicesByUrl. When using choicesByUrl, the preview JSON (Survey Result) does not show the value of choicesByUrl inputs.

        I have attached a short video demonstrating the issue.!
        2465.webm

        Please let me know if I am missing anything.

        Thanks in advance for your help!
        Amit V

          Hello,

          I created a separate ticket on your behalf: T22150: When using choicesByUrl, the preview JSON (Survey Result) does not show the value of choicesByUrl inputs. We placed it in our processing queue and will process it shortly.