Hello,
I'd like to know if we can define the rating items somehow outside the editor, but inside the code.
When creating a custom question like this:
JavaScripteditor
.toolbox
.addItem({
name: "qolSkala",
isCopied: true,
iconName: "icon-default",
title: "QoL Skala",
category: "Quality of Life",
json: {
"type": "rating",
"choices": ["Not at all","A little", "Somewhat","Very"]
}
});
Thanks for any insights.
Hello,
You can customize just added element in the onQuestionAdded event handler.
Here is the working sample - set choices for a radiogroup question:
http://plnkr.co/edit/vnzENS?p=preview
Thanks, Serge
SurveyJS Team