Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Question - Cannot programmatically set a default value for the allowMultiple property #5711

Closed
JaneSjs opened this issue Feb 27, 2023 · 0 comments · Fixed by #5726
Closed
Assignees
Labels
Milestone

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Feb 27, 2023

Original issue

The following code doesn't change a default value for a File question in React: the Allow Multiple Files checkbox remains unchecked.

let prop = Serializer.getProperty("file", "allowMultiple");
prop.value = true;
prop.defaultValue = true;

Example.
image

In Knockout, the above code actually changes the Allow Multiple Files checkbox value:
image
However, the JSON schema comes with a wrong value:

{
     "type": "file",
     "name": "question1",
     "allowMultiple": false
}

Example.

jQuery: Example.

@JaneSjs JaneSjs added the bug label Feb 27, 2023
@tsv2013 tsv2013 assigned andrewtelnov and tsv2013 and unassigned andrewtelnov Feb 28, 2023
@OlgaLarina OlgaLarina added this to the v1.9.77 milestone Feb 28, 2023
@OlgaLarina OlgaLarina self-assigned this Feb 28, 2023
OlgaLarina pushed a commit that referenced this issue Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants