Form submit button not working on WPForms or another solution?

Created by Todd Belcher, Modified on Mon, 26 Aug at 1:54 PM by Todd Belcher

If you're working with a form that just won't submit properly, the first thing to do is consult documentation related to the solutions in play. 


If you end up in troubleshooting mode, we recommend taking a close look at the form submit event, and the submit button click event. There may be conflicting JavaScript that prevents the button from being clicked correctly. Here are two methods you can try, the first is very simple but requires that the jQuery library is already loaded on the site:

jQuery method


If jQuery is on the site, pasting the following into the JavaScript console will provide all events attached to the form button so that you can dig around. Change #form-button to the selector for the form button.

const events = $._data($('#form-button')[0], 'events');
console.log(events);

When Query is not on the site, paste this into console, changing form-button to the ID of your form button.


JavaScript method


const getEventListeners = (element) => {
    const allListeners = [];
    const events = ["click", "change", "submit", "focus", "blur", "keydown", "keyup", "keypress", "mousedown"];
    events.forEach(event => {
        const listeners = getEventListeners(element, event);
        if (listeners && listeners.length) {
            allListeners.push({ event, listeners });
        }
    });
    return allListeners;
};

const button = document.getElementById("form-button");
console.log(getEventListeners(button));





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article