Contact Form 7 Not Submitting or Spinner Keeps Spinning: How to Fix It
Contact Form 7 stuck on the spinner or not submitting? Find the failing REST API request in your browser, then fix blocks, caching and plugin conflicts.
You click Send on your website’s contact form, and a little loading circle spins and never stops. The message isn’t sent. Visitors can’t reach you, and you may not notice.
This guide helps you find what’s blocking the form, and fix it.
What’s going on, in plain words: the form tries to talk to your website and waits for a clear "got it" answer. If that answer never arrives, or comes back in a format the form doesn’t understand, the circle keeps spinning. That’s often caused by a security plugin, a caching plugin (a tool that stores copies of pages to make them faster), a website error, or a setting that blocks that conversation.
In this guide you’ll learn:
- How to tell this problem apart from "the form sent, but the email never arrived" — that’s a different guide, linked below.
- How to use your browser’s Network tools to see the failed request and its error code (the status code).
- How to fix the usual causes: security and firewall rules, caching, other plugins, and the theme.
- What it means if the page reloads instead, with something like
#wpcf7-f123-o1in the address bar. That means the form’s script isn’t running at all.
By the end, you should be able to submit the form and see a normal success or error message, instead of a spinner that never ends.
Who this guide is for
- Site owners whose CF7 form spins forever, does nothing when clicked, or reloads the page.
- Developers who need to find out which plugin or server rule is breaking submissions.
- If the form submits and shows a red, orange or green message but no email arrives, that’s a different problem. See our guide to fixing Contact Form 7 not sending email.
What you need before you start
- A desktop browser (Chrome, Edge, Firefox or Safari) with developer tools.
- WordPress admin access, ideally on a staging copy for plugin tests.
- Optional: file access (SFTP or your host’s file manager) to read the debug log.
Contents
- Identify which symptom you have
- Find the feedback request in the Network tab
- Read the status code and fix the cause
- Check the browser console for script errors
- Make sure the REST API is reachable for visitors
- Exclude Contact Form 7 from caching and script optimisation
- Run a plugin and theme conflict test
- Check the theme and form markup
- Common errors
- Troubleshooting checklist
- Alternatives and limitations
- FAQ
Step 1: Identify which symptom you have
| What happens after clicking Submit | What it means | Start at |
|---|---|---|
| Spinner appears and never stops, with no message | CF7’s script sent the request but got no usable response | Step 2 |
Page reloads and the URL ends in #wpcf7-f123-o1 (or similar) |
Non-AJAX mode: CF7’s JavaScript isn’t working on the page (CF7 FAQ) | Steps 4, 6, 8 |
| Page reloads to a 404 error page | CF7 says this combines non-working JavaScript and a reserved word used as a field name | Steps 4, 8 |
| Nothing happens at all | A script error before CF7 runs, or the button isn’t inside the form | Step 4 |
| Red, orange or green bordered message | The form submitted. This is a mail or spam issue. | Our CF7 email guide |
Step 2: Find the feedback request in the Network tab
- Open the page with the form in a private window. This rules out browser extensions and your logged-in session.
- Open developer tools. Chrome’s documentation gives Control+Shift+J (Windows/Linux) or Command+Option+J (Mac). Then click the Network tab.
- Fill in the form and click Submit.
- In the list of requests, find one named
feedback. Its full URL ends in/wp-json/contact-form-7/v1/contact-forms/<form ID>/feedback. In CF7 6.2.5’s source, this is the URL the script sends a POST request to. - Click it. Note the Status on the Headers tab, then open the Response (or Preview) tab to see what the server sent back.
If there’s no feedback request at all, CF7’s script didn’t run. Go to Step 4.
Opening the URL in your browser shows rest_no_route? That’s expected and doesn’t mean anything is wrong. The feedback route only accepts POST, so a normal visit (a GET request) is refused. In our check of contactform7.com’s own demo form, a GET to the feedback URL returned 404 rest_no_route, while a GET to the form’s /feedback/schema route returned 200 with JSON.
Step 3: Read the status code and fix the cause
In short, the spinning circle means the form is still waiting for a clear answer from your website. Here’s why it never stops: in CF7 6.2.5 the script marks the form as submitting, and the stylesheet shows the spinner while the form has that class (form.submitting .wpcf7-spinner { visibility: visible; }). The script only moves the form to another state when it gets a 2xx response containing valid JSON.
In our test, a 403 page, an HTML page with status 200, and a network failure all left the form stuck in "submitting". Further clicks were ignored, because the script skips forms that are already submitting.
| Status / response | Likely cause | Fix |
|---|---|---|
401, e.g. rest_not_logged_in |
A snippet or plugin requires login for all REST API requests. The WordPress REST API FAQ shows this pattern using rest_authentication_errors. |
Allow anonymous access to the contact-form-7/v1 routes, or remove the blanket restriction (Step 5) |
| 403 with an HTML "Forbidden" or firewall page | A security plugin, host firewall (WAF) or CDN rule blocking /wp-json/ or POST requests |
Allow-list /wp-json/contact-form-7/v1/ in that tool; check its log for the blocked request |
404 rest_no_route on the POST |
The route isn’t registered: CF7 is deactivated, or the form ID is wrong | Re-insert the form shortcode from Contact → Contact Forms; check CF7 is active |
| 404 HTML page | REST API URLs aren’t being routed (rewrite rules or server config) | Re-save Settings → Permalinks. If it still fails, ask your host. |
| 500 | A PHP error during submission (often another plugin hooking into CF7, or mail code) | Turn on the WordPress debug log and read the error (see our CF7 email guide) |
| 200, but the Response is HTML, or starts with a PHP warning before the JSON | A caching, optimisation or maintenance plugin served a page; or PHP notices printed into the response | Exclude the REST route from caching (Step 6); hide PHP notices on production (WP_DEBUG_DISPLAY off) |
| (failed), (blocked) or CORS error in the Console | The request went to another origin (for example http vs https, or www vs non-www), or a browser extension blocked it |
Make Settings → General URLs match the address visitors use; test in a private window |
The last row is an inference from the source: CF7 6.2.5 builds the API address from get_rest_url(). This last row is an inference from the source, not a test on a live site.
Step 4: Check the browser console for script errors
Open the Console tab and reload the page. Look for red errors.
- Errors from other scripts (your theme, a slider, analytics): CF7’s AJAX doc says conflicts with other JavaScript are a common cause. A script that crashes can stop the scripts after it from running.
- "wpcf7 is not defined" or "wpcf7.api is not defined": these messages come from CF7 6.2.5’s own script. CF7 adds a small inline configuration (
var wpcf7 = {...}) just before its script. If an optimisation plugin moves, combines or delays one without the other, the script can’t find it. - No CF7 script at all (search the page source for
contact-form-7): see Step 8 (missingwp_footer()), or check whether someone setWPCF7_LOAD_JStofalse.
Step 5: Make sure the REST API is reachable for visitors
CF7’s FAQ says that Contact Form 7 4.8 and later use the WordPress REST API for AJAX submissions. Without the REST API, only non-AJAX submission works. The WordPress REST API handbook says you should not disable the REST API, because WordPress admin features depend on it.
Checks:
- Tools → Site Health → Status. Look for REST API errors.
- In a private window, open
https://yoursite.com/wp-json/. You should see JSON. - Look for "disable REST API" settings in security plugins, and for code that adds a
rest_authentication_errorsfilter returning an error for logged-out users.
If you must restrict the REST API, allow the CF7 routes. Here’s a minimal example based on the pattern in the WordPress REST API FAQ:
<?php
// Require login for REST requests, EXCEPT Contact Form 7's public routes.
add_filter( 'rest_authentication_errors', function ( $result ) {
if ( true === $result || is_wp_error( $result ) ) {
return $result;
}
$route = isset( $GLOBALS['wp']->query_vars['rest_route'] )
? $GLOBALS['wp']->query_vars['rest_route'] : '';
if ( 0 === strpos( $route, '/contact-form-7/v1/' ) ) {
return $result; // Let visitors submit forms.
}
if ( ! is_user_logged_in() ) {
return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) );
}
return $result;
} );
Not run: our test machine has no PHP. Test on staging before using it. Your security plugin may offer a simpler allow-list setting.
Step 6: Exclude Contact Form 7 from caching and script optimisation
- Page cache / REST cache: make sure your cache never stores responses for
/wp-json/(especiallycontact-form-7/v1), and never caches POST requests. Most caching plugins and CDNs have an exclusion list. - JavaScript optimisation: in "combine", "defer", "delay JavaScript until interaction" or "remove unused JS" settings, exclude:
contact-form-7/includes/js/andcontact-form-7/includes/swv/js/(CF7 6.2.5 registers its main script with theswvvalidation script as a dependency);- the inline
wpcf7configuration script; - WordPress’s
wp-i18nscript (wp-includes/js/dist/), which CF7 6.2.5 also lists as a dependency.
- Clear all caches (plugin, server and CDN), then test in a private window.
Exclusion names differ by plugin; test with yours. The script paths are from CF7 6.2.5.
Step 7: Run a plugin and theme conflict test
For the "spinner shows, then nothing happens" problem, CF7’s FAQ says it’s most likely a plugin or theme conflict. Its advice is to deactivate the other plugins and switch to a default theme.
To do this without breaking your live site:
- Use a staging copy, or the Health Check & Troubleshooting plugin. Its Troubleshooting Mode disables plugins and the theme only for you while you’re logged in. CF7’s author recommends this approach.
- In Troubleshooting Mode, keep only Contact Form 7 active, use a default theme, and submit the form. Note that your own session is logged in; see the tip below.
- If it works, re-enable plugins one at a time, testing after each, until it breaks again. That plugin (or your theme) is the cause.
Tip: some REST restrictions only affect logged-out visitors. After finding a suspect, confirm the fix in a private window.
We have not run Health Check Troubleshooting Mode on a staging site for this guide. On 12 November 2026 the WordPress.org listing for Health Check & Troubleshooting showed version 1.7.1, last updated 25 July 2024 and tested up to WordPress 6.6, so confirm it still suits your WordPress version.
Step 8: Check the theme and form markup
CF7’s "Why isn’t my AJAX contact form working correctly?" page lists three causes:
- The JavaScript file isn’t loaded. Usually the theme is missing
wp_head()(inheader.php) orwp_footer()(infooter.php). In CF7 6.2.5, the script loads in the footer, sowp_footer()matters. - Conflicts with other JavaScript (Step 4).
- Invalid HTML. CF7 recommends the W3C Markup Validation Service. Typical culprits are a form placed inside another
<form>(CF7 shows "This contact form is placed in the wrong place"), or unclosed tags in the page builder.
Also check that your field names don’t use reserved words. CF7’s FAQ links these to the "redirects to a 404 page" problem.
Common errors
| What you see | Where it comes from | Fix |
|---|---|---|
| Spinner forever, no message | No valid JSON from the feedback request | Steps 2–3 |
URL ends with #wpcf7-f123-o1 after submitting |
Non-AJAX mode (CF7 FAQ) | Steps 4, 6, 8 |
| Redirect to a 404 page | Non-working JavaScript plus a reserved field name (CF7 FAQ) | Steps 4, 8 |
| Console: "wpcf7 is not defined" / "wpcf7.api is not defined" | CF7’s inline config is missing or loaded after the script | Step 6 |
Network: 401 rest_not_logged_in |
REST restricted to logged-in users | Step 5 |
| Network: 403 HTML page | Security plugin, WAF or CDN | Allow-list /wp-json/contact-form-7/v1/ |
| "This contact form is placed in the wrong place." | Form nested inside another form | Move the shortcode out of the outer form |
| Red, orange or green message but no email | Mail or spam handling, not submission | Our CF7 email guide |
Troubleshooting checklist
- Private window: does the form still fail?
- Network tab: is there a
feedbackrequest? What’s its status and response? - Console: any red errors? Any
wpcf7errors? - Is
/wp-json/reachable in a private window? Does Site Health report REST API problems? - Are caching, CDN and JavaScript-optimisation exclusions in place for CF7?
- Does the form work in Troubleshooting Mode with only CF7 active?
- Do the theme’s templates call
wp_head()andwp_footer()? Is the HTML valid? - Are your field names free of reserved words?
Alternatives and limitations
- Non-AJAX submission: CF7 still works without JavaScript. Its FAQ says you lose AJAX submission, DOM events and a few other features. GA4 tracking that relies on
wpcf7mailsentthen stops, as described in our CF7 GA4 guide. - Another form plugin: if a required security rule can’t allow the REST API, a plugin that submits differently may fit better. Compare carefully before switching.
- Limitations:
- Our tests cover CF7’s script logic and public endpoints, not every security or caching plugin.
- Hosts and CDNs differ.
- Always test changes on staging first.
FAQ
Why does the Contact Form 7 spinner keep spinning?
The form is waiting for a valid JSON reply from your site’s REST API. In our test with CF7 6.2.5’s script, any blocked, failed or non-JSON response left it spinning.
Can Contact Form 7 work if the REST API is disabled?
Only in non-AJAX mode, according to CF7’s FAQ. The page reloads after submitting.
Is it safe to disable the WordPress REST API?
The WordPress REST API handbook says you shouldn’t, because WordPress admin features depend on it. Restrict specific routes instead if you need to.
Why does my form work when I’m logged in but not for visitors?
Usually a REST rule or firewall that only affects logged-out users, or a cached page served to visitors. Test in a private window.
Do I need to reinstall Contact Form 7?
Rarely. The cause is usually outside CF7. Find the failing request first.
Official references
- Contact Form 7: The spinner shows up, but then nothing happens, Why isn’t my AJAX contact form working correctly?, REST API is deactivated on my site, Form redirects to #wpcf7-f123…, Redirects to a 404 page, Loading JavaScript and stylesheet only when necessary, Why deactivate plugins and switch to the default theme, Contact Form 7 6.2.5 release
- WordPress: REST API FAQ, REST API discovery, Health Check & Troubleshooting plugin
- Chrome: Inspect network activity (DevTools)
- Source: Contact Form 7 6.2.5 front-end script
Next step
Once the form submits, make sure the emails arrive (our CF7 email guide) and that each successful submission is tracked as a GA4 key event.
Last updated: 13 November 2026



