How do I clear the form after submit?
rjuevesano opened this issue ยท 4 comments
rjuevesano commented
I want to clear the form after submitting. How to do it?
shabanBabar commented
i think you can access the file in event handler array in success parameter.
just put function there like success: yourfunc(dropZone) and remove the file in it
akash-more commented
Check my answer here I faced the same issue https://stackoverflow.com/questions/54671641/how-to-destroy-dropzone-in-react-dropzone-component-after-file-upload/54684637#54684637
Check the comment to the answer also.
yuriy-voypost commented
Hi! Any updates on this?
After destroying I can't use Dropzone component.
yuriy-voypost commented
As a workaround: just use method removeAllFiles()
from its prototype like so:
dropzoneObj.removeAllFiles()