Hi guys, I have a problem with surveyjs about setting default value.
{
"pages": [
{
"name": "page1",
"elements": [
{
"type": "checkbox",
"name": "question1",
"defaultValue": [
{
"id": "2",
"test": "a2"
},
{
"id": "3",
"test": "a3"
}
],
"choices": [
{
"value": {
"id": "1",
"test": "a1"
},
"text": "a1"
},
{
"value": {
"id": "2",
"test": "a2"
},
"text": "a2"
},
{
"value": {
"id": "3",
"test": "a3"
},
"text": "a3"
}
]
}
]
}
]
}
As you see my definition above, the value that I set for the choices is an object.
And it's not working correctly.
The default value didn't set in UI. But that default value will be return in the result if I do not choose any options.
So I think that the default value that I set for the element still match with the choices, but somehow it's not showing in the UI.
And with my case, I really need to set the value is an object.
Can you guys help me check about that?
Thank you.
Hello,
We did not test the default value with the complex objects.
I will take a look.
Thank you,
Andrew
SurveyJS Team