Question T14814
Visible to All Users

Display "other" answers

created a year ago

Hello,

I have a survey with the possibility of answering "other" on multiple questions. I am displaying the results of the survey with the Dashboard component but I don't find how to display the input from the "other" option. On the first screenshot, at the bottom where is written "There are no results yet" I would like to display a table with the answers.

Clipboard-File-1.png

I am using VueJS and I create the VisualizationPanel like this.

Code
const vizPanel = new VisualizationPanel( surveyModel.getAllQuestions(), surveyResults ?? [], vizPanelOptions, )

On surveyResults I have

JSON
{question1: 'other'}

And the survey elements used to create the survey object

JSON
{ choices: ['Item 1', 'Item 2', 'Item 3'], name: "question1", showOtherItem: true, type: "radiogroup" }

How could I show the text "This is my other answer" written by the user as displayed on the second screenshot on the dashboard of the first one?

Clipboard-File-2.png

Thank you

Answers approved by surveyjs Support

created a year ago

Hello,
A SurveyJS Dashboard can automatically display Other answers. For this, include these answers to survey results which you pass to a visualization panel. The Other answer should be saved under the questionName-Other key.

JSON
{ "question1": "other", "question1-Comment": "This is my other answer" }

View Demo
Clipboard-File-1.png

Please let me know if you have any further questions.

    Comments (2)

      Hi !
      I've managed to display other answers for all question types except multi select matrix and dynamic matrix. I see that in those cases there is a "other items and comments" table for each column, so I've also tried with this json

      JSON
      { "question1-Column1": "other", "question1-Column1-Comment": "This is my other answer" }

      But I am not able to display anything (neither the bar with the result number nor the text on the table).
      I don't find any documentation regarding this, could you tell me what is the correct JSON format?

      Thank you

        Hello,

        Unfortunately right now multi select matrix and dynamic matrix doesn't have an option to show the "other" answers. In some cases we show several rows and columns on the same chart (and show other answers here can be problematic) in other cases we draw a separate chart for each column (and here we could show the other option). Could you share your survey JSON and how do you expected other items to be visualized in your case? I hope we'll find a solution for you.

        Thanks, Serge
        SurveyJS Team