Title: DropZoneJS hook
Last modified: April 12, 2021

---

# DropZoneJS hook

 *  Resolved [Ron Phillips](https://wordpress.org/support/users/netizenron/)
 * (@netizenron)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/dropzonejs-hook/)
 * Hi All,
 * I’m trying to use dropzonejs on a the frontend. When I enqueued the script and
   css, the dropzonejs form worked without out calling an instance. By work, I could
   drag files into the dropzone and they were uploaded to the upload folder structure.
   The issue I’m having is hooking into the script and modifying the variables, 
   as well as capture the file data so that I can add them to the media library 
   and attach to a specific post. When I try to hook the name Dropzone, it says 
   it doesn’t exist, but that is the name every reference I’ve found utilizes. Does
   WordPress have a built in hook with a different name?
 *     ```
       <div id="fancy-contact-form">
         <form action="?step=review&id=<?=$_GET['id']?>" method="post" class="dropzone dz-clickable" enctype="multipart/form-data">
           <div class="dz-default dz-message"><span>Drop files here to upload</span></div>
           <input type="hidden" name="submitted" value="1">
           <p align="right"><input type="Submit" value="Upload files"></p>
         </form>
       </div>
   
       <script type='text/javascript'>
           window.onload = function() {
               Dropzone.autoDiscover = false;
               Dropzone.options.dropzoneForm = {
                   autoProcessQueue: false,
                   parallelUploads: 10, 
                   addRemoveLinks: true,
                   init: function() {
                      myDropzone = this;
                   }
               }
           }
       </script>
       ```
   
 * I’m using WP 5.7.
 * Thank you.
 * -Ron

Viewing 1 replies (of 1 total)

 *  Thread Starter [Ron Phillips](https://wordpress.org/support/users/netizenron/)
 * (@netizenron)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/dropzonejs-hook/#post-14309988)
 * Hi all,
 * Simple issue. I didn’t add the ID to the form. D’oh!
 * Thanks for looking if you looked.
 * -Ron

Viewing 1 replies (of 1 total)

The topic ‘DropZoneJS hook’ is closed to new replies.

## Tags

 * [dropzone](https://wordpress.org/support/topic-tag/dropzone/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 1 participant
 * Last reply from: [Ron Phillips](https://wordpress.org/support/users/netizenron/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/dropzonejs-hook/#post-14309988)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
