Good morning,
I added an itemvalues property to the survey creator but the default values are not saved to the survey's definition.
It's only after making the first change to that property that it shows in the JSON.
Here is the code I've been using:
Codeconst defaultChoices = [
{ value: 'grp1', text: 'Groupe 1' },
{ value: 'grp2', text: 'Groupe 2' },
{ value: 'grp3', text: 'Groupe 3' },
];
Serializer.addProperty('survey', {
name: 'scenarios:itemvalues',
category: myCategory,
displayName: scenarios,
default: defaultChoices,
choices: defaultChoices,
});
As you can see in the following image, the array of values does show in the creator.survey.scenarios but not in the creator JSON triggered on auto save.
Is there a method or a specific propertyInfo structure I could use to save default values in the definition?
PS: I do have the commercial license.