surveyjs/custom-widgets

Emotions Rating - Choices are empty when converting an Emotions Rating question from another question

JaneSjs opened this issue · 1 comments

Run this example. Click Add Question to add a new question; click a question type selector to convert this question to an Emotions Rating. On a design surface, it appears correctly:
image
However, in a survey JSON, the choices collection is empty:

{
  "type": "emotionsratings",
  "name": "question2"
}

Also, if you open the preview - this question is available, but it doesn't appear in survey results.
image

Original Issue: T11456 - emotion rating does not have the "choices" key when I change question type

Define a list of choices using the defaultJSON property:

SurveyCreator.settings.toolbox.defaultJSON.emotionsratings = {
 "choices": [
        "1",
        "2",
        "3",
        "4",
        "5"
      ] 
};

Example.