Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Form submit button spinner never stops: how to find and fix it

CNV-044High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Most modern forms send data in the background using JavaScript (often called AJAX). When you press submit, the button shows a spinner or a 'Sending...' label while it waits for the server to reply. When the reply arrives, the form shows a thank-you message or redirects.

The spinner-forever bug happens when that reply never arrives or cannot be read. The request may be pending, blocked, or answered with something the script does not understand. The page keeps waiting, and the visitor sees movement but no result.

Common causes: - A JavaScript error before or during the submit handler. - The form endpoint is slow, down, or returns an error page instead of the expected response. - A PHP warning or notice is printed into the response, so the script cannot parse it as valid JSON. - A caching, security or optimisation plugin blocks or rewrites the request. - A CAPTCHA script fails to load or never returns a token. - A third-party service (CRM, email provider, webhook) is called and never answers.

Why it costs you leads or sales

The visitor has done the hard part and filled in the form. If nothing confirms it, they assume it failed. Some retry, some email you, and many simply leave. Worse, the lead may have been saved on your side while the visitor sees a hang, so you get duplicates or confused follow-ups. Or the lead was never saved at all, and you never know it existed.

Where the lead is lost
  1. Visitor fills formFields completed
  2. Clicks submitSpinner starts
  3. Request or reply failsBlocked, pending or unreadable
  4. Thank-you messageNever shown
  5. Lead in inbox and CRMMay never arrive

The form sends the request, but the reply never completes the journey.

A submit that never finishes

The spinner runs, but no confirmation ever appears.

Visitors who finish the formExample numbers
Visitors who finish the form (example)Form works: 98 %; Spinner hangs: 15 %038759815Form worksSpinner hangs%

Example: of 100 visitors who press submit, how many end up with a confirmed enquiry. Numbers are illustrative.

How to check if your site has it

Reproduce the hang and find the cause
  1. Open the page in a private window

    This avoids extensions and cached scripts changing the result. Try a second browser too.

  2. Open developer tools

    Press F12 (or Cmd+Option+I on Mac). Go to the Console tab and the Network tab. Tick 'Preserve log' in Network.

  3. Submit the form with test details

    Use a clearly fake name and an email you control.

  4. Read the Console

    A red error such as 'Uncaught TypeError' or 'Failed to load resource' points to a broken script or blocked file.

  5. Read the Network tab

    Find the request fired on submit (often a POST to admin-ajax.php, a /wp-json/ path, a form-handler URL or a third-party API). Check its status: pending forever, 4xx, 5xx, or 200 with a non-JSON body.

  6. Click the request and view Response

    Look for PHP warnings, HTML error pages or empty output where you expect JSON or a success message.

What you see in the Network tab and what it usually means
What you seeLikely cause
Request stays 'pending'Server or third-party API not answering, or a timeout
Status 403Security plugin, firewall or nonce check blocked it
Status 500Server-side error in the form handler
Status 200 but spinner staysResponse is not valid JSON, often a PHP warning or HTML in the output
No request at allJavaScript error before the submit, or a script not loaded
Request blocked or cancelledAd blocker, CORS rule or CSP rule

How to fix it

Fix the cause you found in the previous section. The steps below cover the most common platforms. If you changed or updated anything recently (a plugin, theme, caching rule or CAPTCHA key), undo that first and test again.

Fix by platform
  1. Rule out plugin conflicts

    Temporarily deactivate caching, minify and security plugins, then retest. Re-enable one at a time to find the culprit.

  2. Exclude form scripts from optimisation

    In your caching or optimisation plugin, exclude the form plugin's JavaScript from minify, combine and delay/defer options. Clear all caches.

  3. Turn on debug logging

    In wp-config.php set WP_DEBUG and WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false. Check wp-content/debug.log for errors, and remove any PHP warning that prints into the response.

  4. Check the mail and integration settings

    A hung mail server or webhook can stall the response. Test your SMTP or add-on connection in the form plugin settings.

Stop the spinner on error or timeout (custom forms)javascript
const form = document.querySelector('#lead-form');
const button = form.querySelector('button[type="submit"]');

form.addEventListener('submit', async (e) => {
  e.preventDefault();
  button.disabled = true;
  button.classList.add('loading');

  const controller = new AbortController();
  const timer = setTimeout(() => controller.abort(), 15000);

  try {
    const res = await fetch(form.action, {
      method: 'POST',
      body: new FormData(form),
      signal: controller.signal
    });
    if (!res.ok) throw new Error('Server error ' + res.status);
    form.innerHTML = '<p>Thanks, we have your message.</p>';
  } catch (err) {
    alert('Sorry, that did not send. Please try again or email us.');
  } finally {
    clearTimeout(timer);
    button.disabled = false;
    button.classList.remove('loading');
  }
});

How to confirm it's fixed

Confirmation checks
  • Submit the form in a private window and see a thank-you message or redirect within a few seconds.
  • The Console shows no red errors on submit.
  • The submit request in the Network tab returns a 200 or expected status with a valid response.
  • The test lead arrives in your inbox.
  • The test lead appears in your CRM with the right fields.
  • Test on mobile and in a second browser.
  • Clear caches and retest after any plugin or theme change.
Form behaviour before and after

Before

  • Spinner runs with no end
  • Visitor unsure if it sent
  • Lead may or may not be saved
  • No error shown to anyone

After

  • Spinner ends in a clear thank-you
  • Errors show a helpful message
  • Lead reaches inbox and CRM
  • Failures can be spotted quickly

How to prevent it happening again

Prevention habits
  • Test your forms after every plugin, theme, caching or tag change.
  • Exclude form scripts from minify, combine and delay settings.
  • Keep CAPTCHA site and secret keys current.
  • Use SMTP or a transactional email service rather than relying on default server mail.
  • Show an error message in the form when a request fails, so it never spins silently.
  • Check form integrations (CRM, webhooks, Zapier) for expired logins.
  • Run an automated test of each form on a schedule.

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor fills in and submits your form the way a real person would, then waits for the expected result, such as a thank-you message or redirect. If that result does not appear within the wait limit, the wait_for step times out and the step fails.

A failure is re-checked from a second region before one alert goes out (email, Slack, Teams, WhatsApp, webhook or PagerDuty), with a screenshot and a likely cause. Test traffic is marked with utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent, and it never bypasses CAPTCHAs or bot protection. If a CAPTCHA blocks the test, that shows up as a failure for you to review.

The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial.

Questions people ask

Why does my contact form keep spinning and never submit?

The form sent its request but never got a readable reply, or a JavaScript error stopped the page from handling it. Open the browser's Network and Console tabs, submit the form, and look for a pending, blocked or failed request, or a red error. That shows whether the cause is the script, the server or a third-party service.

How do I fix Contact Form 7 spinner that never stops?

Check the Console for JavaScript errors and the response of the admin-ajax or REST request for PHP warnings. Deactivate caching, minify and security plugins to find conflicts, and exclude the form plugin's scripts from optimisation. Also make sure your mail setup is not hanging the request.

Why is my form stuck on 'Sending' on WordPress?

Typical causes are a plugin conflict, a script removed or delayed by an optimisation plugin, a PHP warning corrupting the JSON response, or a slow mail server. Turn on WP_DEBUG_LOG, retest, and read wp-content/debug.log. Then disable plugins one by one to isolate the conflict.

Can a CAPTCHA cause a form to load forever?

Yes. If the CAPTCHA script fails to load, uses wrong keys or never returns a token, the form can wait indefinitely. Check the Console for CAPTCHA errors and confirm your site and secret keys match the domain. Do not try to bypass the CAPTCHA, fix its setup.

Does the lead still get saved if the spinner never stops?

Sometimes. The server may save the lead and then fail to send a proper response, or it may fail before saving anything. Check your inbox, CRM and form entries after a test submission to see which case you have.

How can I stop a spinner from running forever on a custom form?

Add a timeout with AbortController and an error handler so the spinner stops and shows a message. Make the server always return a response, including on errors. This is a safety net, so still investigate why the request failed.

How do I know when my form stops working?

Test it regularly, or use monitoring that submits it on a schedule. FunnelGuard runs your form journey with a robot visitor and alerts you if the expected result does not appear in time, with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: wait_for timeout fails the step.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.