Open joespinoz opened 3 years ago
@ArpaxHerzeck It works fine to me. Here is the example with your JSON.
Do you set survey.data = yourData;
in your code? it will reset all values. You probably need to use survey.mergeData function, survey.mergeData(yourData);
.
Thank you, Andrew
Are you requesting a feature, reporting a bug or asking a question?
Reporting a bug
When you give a default value to a component like (radiogroup, checkbox list, dropdown or boolean) doesnt work correctly when you try to visualize.
The code of the survey is this:
"definition": { "pages": [ { "name": "página1", "elements": [ { "type": "radiogroup", "name": "pregunta1", "defaultValue": "item1", "choices": [ "item1", "item2", "item3" ] }, { "type": "checkbox", "name": "pregunta2", "defaultValue": [ "item2" ], "choices": [ "item1", "item2", "item3" ] }, { "type": "dropdown", "name": "pregunta3", "defaultValue": "item3", "choices": [ "item1", "item2", "item3" ] }, { "type": "boolean", "name": "pregunta4", "defaultValue": "true" }, { "type": "boolean", "name": "pregunta5", "defaultValue": "false" } ] } ] }