Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

Gravity Forms AJAX Not Working: Causes and How to Fix It

Gravity Forms AJAX Not Working: Causes and How to Fix It

Short answer

Gravity Forms AJAX usually stops working because of a JavaScript error, a cache or script optimization setting, or a firewall blocking the request. Confirm AJAX is enabled on that embed, check the browser console for errors, exclude Gravity Forms scripts from delay and combine settings, and test with other plugins disabled.

Key takeaways

  • AJAX is enabled per embed, through the block toggle or ajax=true in the shortcode.
  • The browser console usually shows the JavaScript error that stops the submission.
  • Delay, defer and combine JavaScript settings in cache plugins are the most common cause.
  • Cloudflare Rocket Loader and firewalls can block or rewrite the AJAX request.
  • Themes must call wp_footer so Gravity Forms scripts can load.

Why is Gravity Forms AJAX not working?

Gravity Forms AJAX usually fails because of a JavaScript error, a script optimization setting, a firewall blocking the request, or a form loaded in a way that skips its scripts.

With AJAX on, a form should submit without reloading the page, show validation errors in place and then display the confirmation message. When it breaks, you typically see one of these symptoms:

  • The spinner keeps turning and nothing happens
  • The page reloads even though AJAX is enabled
  • Validation errors never appear
  • The form vanishes but no confirmation is shown
  • Entries are saved, yet the visitor sees no feedback

The fixes below go from the most common cause to the least common. Test the form after each step, so you know which change solved it.

SymptomMost likely causeFirst fix
Endless spinnerJavaScript error or blocked requestCheck the browser console
Full page reloadAJAX not enabled for that embedCheck the block setting or shortcode
Works logged in, fails logged outPage or script cacheExclude the page and purge cache
Fails only in a popupScripts not loaded for dynamic contentLoad scripts on the page or use the plugin's popup support
Fails after a security changeFirewall blocking the POST requestCheck firewall logs and allowlist the rule

Is AJAX actually enabled on the form?

AJAX is not a form-wide setting in Gravity Forms; you enable it on each embed, through the block's advanced settings or by adding ajax=“true” to the shortcode.

This catches many people out. The same form can submit with AJAX on one page and with a full reload on another.

In the block editor, select the Gravity Forms block and look for the AJAX toggle in the sidebar, under the advanced options. With a shortcode, the embed should look like this:

[gravityform id=“1” title=“false” ajax=“true”]

If you use Elementor or another builder widget, check that widget's own AJAX option. Our guide on how to use Gravity Forms shows each embed method.

How do you find the JavaScript error behind it?

Open the page, press F12 to open the browser developer tools, switch to the Console tab, submit the form and read any red errors that appear.

An error from another plugin or the theme can stop every script that runs after it, including Gravity Forms. The file name in the error usually points to the plugin or theme at fault.

Chrome's guide to the DevTools Console explains how to read these messages. Also check the Network tab for the submission request and its status code.

A 403 status points to a firewall or security rule. A 500 status points to a PHP error, which you can find by turning on logging with our guide to enabling debug mode in WordPress.

Could caching or script optimization be the cause?

Yes, script optimization is the most common cause: delaying, deferring or combining JavaScript can load Gravity Forms scripts in the wrong order or too late.

Cache plugins such as WP Rocket, LiteSpeed Cache and W3 Total Cache all have options that change how JavaScript loads. These speed up pages, but forms are sensitive to load order and to jQuery being available on time.

  1. Turn off Delay JavaScript execution or add Gravity Forms scripts to its exclusions
  2. Turn off JavaScript combine or concatenate options
  3. Exclude jQuery and the gravityforms plugin folder from defer
  4. Purge every cache layer and test in a private window

Our guide on WP Rocket delay JavaScript exclusions shows the exact fields for that plugin.

If the form works when logged in but fails when logged out, a cached page is the prime suspect. Exclude the form page from page cache as a test.

Could Cloudflare or a firewall be blocking it?

Cloudflare Rocket Loader, bot protection or a web application firewall can block or rewrite the AJAX request, so the form never gets a valid response.

Rocket Loader changes how scripts load and is a well-known cause of form problems. Cloudflare's Rocket Loader documentation explains how to turn it off for a site or page.

Security plugins and server rules such as ModSecurity can also block form posts that contain certain words or code-like text. Check the firewall log for blocked requests at the time of your test submission.

If you find a matching block, allowlist that rule for the form endpoint instead of turning off the firewall entirely. Our guide on Cloudflare cache rules for WordPress also covers bypassing cache for dynamic pages.

Is another plugin or the theme conflicting?

A conflict with another plugin or your theme is likely if the console shows errors from their files, or if the form works on a default theme.

Run a quick conflict test on a staging copy. Switch to a default theme such as Twenty Twenty-Five, then deactivate other plugins one at a time while testing the form.

The Health Check & Troubleshooting plugin can do this for your session only, so visitors are not affected. Our guide on fixing a plugin conflict walks through the process.

Common culprits include other form plugins that load an old copy of jQuery, slider and popup plugins, and themes that remove the wp_footer() call.

Does the theme load scripts correctly?

Gravity Forms needs your theme to call wp_head() and wp_footer(), because WordPress prints most plugin scripts in those two places.

Custom or very old themes sometimes leave out wp_footer(). Without it, the scripts that handle AJAX submissions never load, even though the form HTML shows.

The developer reference for wp_footer() explains what this function does. It should appear just before the closing body tag in the theme's footer template.

Also check Forms > Settings for an output setting that disables Gravity Forms CSS or scripts. Turning off styles is fine, but scripts must still load.

Why does AJAX fail in popups and tabs?

Forms loaded inside popups, tabs or content fetched after page load may miss the scripts and initialization that Gravity Forms runs when the page first loads.

If the popup content is added to the page later, Gravity Forms may not know the form exists. The fix depends on the popup tool.

Many popup plugins, including Elementor's popup feature, load their content on page load and work fine. Others fetch it later and need the form scripts enqueued on the page beforehand.

A simple workaround is to place the same form, hidden or not, on the page itself so its scripts load. Our guide on Elementor popups not working covers popup-specific issues.

Are there form settings that break AJAX?

Some form settings can make AJAX look broken, such as a redirect confirmation, duplicate form embeds, or a page that has two copies of the same form.

Placing the same form twice on one page can confuse the AJAX handler, since both copies share an ID. Use one embed per page, or duplicate the form if you need two.

A confirmation set to redirect will send the visitor to another page after submission. That is expected behaviour, not an AJAX failure.

Spam tools can also block submissions quietly. If you use reCAPTCHA or Turnstile, test with it briefly disabled, and see our guide on stopping contact form spam for settings that do not block real people.

What if entries save but no email arrives?

If AJAX submits fine and entries appear under Forms > Entries but emails do not arrive, the problem is email delivery, not AJAX.

Gravity Forms hands notification emails to WordPress, which often uses the server's basic mail function. Many messages then land in spam or are rejected.

Set up an SMTP plugin and use a From address on your own domain. Our guide on fixing Gravity Forms notifications not sending covers the full process.

When should you contact Gravity Forms support?

Contact Gravity Forms support when the form still fails on a default theme with all other plugins off, since that points to a bug or a server issue.

Before you write, update Gravity Forms, WordPress and PHP, and note the exact steps that trigger the problem. Include console errors and the status code of the failed request.

Gravity Forms is a paid plugin, so an active license gives you access to official support. Community resources such as Gravity Wiz's AJAX guide can also help explain how AJAX submissions work under the hood.

Frequently asked questions

How do I enable AJAX in Gravity Forms?

Select the Gravity Forms block and turn on the AJAX toggle in its advanced settings, or add ajax equals true to the gravityform shortcode. AJAX is set for each embed, so check every page where the form appears.

Why does my Gravity Form keep spinning after submit?

An endless spinner means the request never got a valid response. The cause is usually a JavaScript error, a script optimization setting, or a firewall blocking the request. Check the browser console and Network tab first.

Can WP Rocket break Gravity Forms AJAX?

Yes. Delay JavaScript execution and combine options can load Gravity Forms scripts too late or out of order. Exclude jQuery and the Gravity Forms scripts, purge the cache and test again while logged out.

Why does Gravity Forms work logged in but not logged out?

Logged-in users usually skip page caching and some script optimization. If the form only fails for visitors, exclude the form page from caching and script optimization, then purge every cache layer.

Should I turn AJAX off instead?

Turning AJAX off is a valid short-term fix. The form will reload the page on submit, but it will still validate, save entries and show the confirmation. Fix the root cause later if you prefer the smoother experience.

Sources

  1. Gravity Forms and AJAX: Everything You Need to Know Gravity Wiz
  2. Console overview Chrome for Developers
  3. Rocket Loader Cloudflare Docs
  4. wp_footer() WordPress Developer Resources

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.