Title: Submit button gives JavaScript error
Last modified: September 26, 2023

---

# Submit button gives JavaScript error

 *  Resolved [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/)
 * There is an error in the JavaScript when a submit `button` HTML tag is used. 
   This occurs at the point a file upload is completed and the submit button switches
   from disabled to not disabled.
 * This JavaScript/jQuery should refer to either the first submit button or input,
   rather than just the (old style) input:
 *     ```wp-block-code
       form.querySelector('input[type="submit"]').removeAttribute('disabled');
       ```
   
 * You can alter this to be something like this for wider support:
 *     ```wp-block-code
       form.querySelector('button[type="submit"],input[type="submit"]').removeAttribute('disabled');
       ```
   
 * I haven’t checked elsewhere in the script, but further references to the submit
   button may need to be altered.
    -  This topic was modified 2 years, 8 months ago by [Noah Hearle](https://wordpress.org/support/users/designextreme/).
      Reason: Added URL
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsubmit-button-gives-javascript-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Glen Don Mongaya](https://wordpress.org/support/users/glenwpcoder/)
 * (@glenwpcoder)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17080642)
 * Hello [@designextreme](https://wordpress.org/support/users/designextreme/) ,
 * Thanks for reporting the issue.
 * Are you using the **[submit] **button tag from Contact Form 7, or have you created
   a custom button using HTML?
 * Glen
 *  Thread Starter [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17080659)
 * [@glenwpcoder](https://wordpress.org/support/users/glenwpcoder/) I’ve created
   my own so that I can style it correctly. It does submit as expected.
 *  Plugin Author [Glen Don Mongaya](https://wordpress.org/support/users/glenwpcoder/)
 * (@glenwpcoder)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17081622)
 * Thanks, [@designextreme](https://wordpress.org/support/users/designextreme/) 
   I will add a fix on my next update.
 *  Thread Starter [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17086095)
 * [@glenwpcoder](https://wordpress.org/support/users/glenwpcoder/) Thanks!
 * I use your plugin on 3 or 4 of my websites. One issue relating to the submit 
   event that has caused quite a few problems – duplicate submissions. I wrote my
   own JavaScript code to prevent this.
 * I did notice this as a _premium_ feature, yet this is really something that would
   make this plugin/extension a lot more reliable for all users. I think it will
   just make things better for everyone if this was a standard feature.
 *  Thread Starter [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17313425)
 * [@glenwpcoder](https://wordpress.org/support/users/glenwpcoder/) I have this 
   error returning and it’s breaking other things:
 * _Uncaught TypeError: form.querySelector(…) is null_
 * Location: ./assets/js/codedropz-uploader-min.js – 512:34
 * The button is not a CF7 shortcode button, rather it is:
 *     ```wp-block-code
       <button type="submit" id="message-send" name="send" class="send" value="1">Send</button>
       ```
   
 *  Plugin Author [Glen Don Mongaya](https://wordpress.org/support/users/glenwpcoder/)
 * (@glenwpcoder)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17313993)
 * Thanks [@designextreme](https://wordpress.org/support/users/designextreme/) I’ll
   add or update the code to support submit and button tag.
 * I will release a new version today.
 *  Plugin Author [Glen Don Mongaya](https://wordpress.org/support/users/glenwpcoder/)
 * (@glenwpcoder)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17319368)
 * I just released a new version, please update and let me know if you still see
   an error.
 *  Thread Starter [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17321402)
 * Thanks for sorting this [@glenwpcoder](https://wordpress.org/support/users/glenwpcoder/).
   I can confirm this has been resolved.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Submit button gives JavaScript error’ is closed to new replies.

 * ![](https://ps.w.org/drag-and-drop-multiple-file-upload-contact-form-7/assets/
   icon-128x128.jpg?rev=1984850)
 * [Drag and Drop Multiple File Upload for Contact Form 7](https://wordpress.org/plugins/drag-and-drop-multiple-file-upload-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/drag-and-drop-multiple-file-upload-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/drag-and-drop-multiple-file-upload-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/drag-and-drop-multiple-file-upload-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/drag-and-drop-multiple-file-upload-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/drag-and-drop-multiple-file-upload-contact-form-7/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/submit-button-gives-javascript-error/#post-17321402)
 * Status: resolved