-
Notifications
You must be signed in to change notification settings - Fork 15
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
FORMS-14814: allow multiple file attachment #191
base: main
Are you sure you want to change the base?
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
…orms into multiplefileupload
@lovelymandal16 Could you refactor the changes to align with the new boilerplate structure? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min/max items missing for multiple attach support
@@ -74,6 +81,30 @@ | |||
"name": "acceptMessage", | |||
"label": "File type error message", | |||
"valueType": "string" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields should only come if multiple is true
@@ -211,15 +211,26 @@ | |||
} | |||
}, | |||
{ | |||
"title": "Captcha (Invisible)", | |||
"id": "captcha", | |||
"title": "Checkbox group", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for these changes?
if (input.multiple) { | ||
field.type = 'file[]'; | ||
if (field.properties?.maxFilesMessage) { | ||
input.dataset.maxFilesMessage = field.properties.maxFilesMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should come in constraints msgs and not as custom props.
blocks/form/form.js
Outdated
@@ -303,7 +303,7 @@ function inputDecorator(field, element) { | |||
input.checked = field.value === input.value; | |||
} | |||
} else { | |||
input.multiple = field.type === 'file[]'; | |||
input.multiple = field.type === 'file[]' || field.properties?.allowMultiple; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow multiple check should not be required here. It should be handled via sling models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline comments
Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #
Test URLs: