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

Multiple Dropzone's for same field name cause conflicts #88

Open
Illizian opened this issue Nov 8, 2017 · 0 comments
Open

Multiple Dropzone's for same field name cause conflicts #88

Illizian opened this issue Nov 8, 2017 · 0 comments

Comments

@Illizian
Copy link

Illizian commented Nov 8, 2017

I have discovered an issue for my particular use case. I am using Dropzone to allow the attachment of files to comments, both replies and root comments.

However, when rendering to the DOM the same ID is used (as it's mapped to the field name). This therefore causes all Dropzones to fire when clicking on any of the Dropzones and forces all files added to only appear in the Dropzone that appears first in the HTML order.

I have a "fix" for this, which is to generate and add a unique hash to the ID, by adding a getUniqueID method to the FileAttachmentField class and then consume this within the templates. The fix has resolved my issue but I wonder whether you can advise if this a problem you'd accept a PR for or whether I've missed something; I'm pretty new to Silverstripe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant