• Resolved Noah Hearle

    (@designextreme)


    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:

    form.querySelector('input[type="submit"]').removeAttribute('disabled');

    You can alter this to be something like this for wider support:

    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. Reason: Added URL

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hello @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

    (@designextreme)

    @glenwpcoder I’ve created my own so that I can style it correctly. It does submit as expected.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Thanks, @designextreme I will add a fix on my next update.

    Thread Starter Noah Hearle

    (@designextreme)

    @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

    (@designextreme)

    @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:

    <button type="submit" id="message-send" name="send" class="send" value="1">Send</button>
    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Thanks @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

    (@glenwpcoder)

    I just released a new version, please update and let me know if you still see an error.

    Thread Starter Noah Hearle

    (@designextreme)

    Thanks for sorting this @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.