Fresh Forms for Gravity


Caching is great for scenarios where your post or page content it’s not changed frequently, but if you have a form embedded to which you do changes very often or you’re using dynamic code, that doesn’t run for a cached page, or using third-party solutions relaying in dynamic live data (e.g. reCAPTCHA), using caching in these cases is going to cause issues.

An easy solution is to configure your caching plugin or proxy to exclude the page where the form is embedded from caching, but you need also to remember this when you create a new page or embed a new form in an existing page…

This plugin will take care of the above automatically doing the following:

  1. Flush current cache on plugin activation. This is required in order to allow the next step to run.
  2. Dynamically check if there’s a Gravity Forms for any of the supported embedding methods (see below for the list).
  3. If so, it will prevent post/page from being cached by any of the supported caching plugins, browsers and CDN/Proxies.

Embedding methods supported:

  • WordPress default editor, shortcode or Gutenberg block. Content of any post type, including pages and custom posts.
  • Elementor. The following widgets added to the post content are supported: Shortcode, Text.
  • Essential Addons for Elementor Gravity Forms widget.
  • Divi. It should work with any of the default modules where you can insert a GF shortcode into the content. e.g. Call To Action, Text, Tabs…
  • WP Tools Gravity Forms Divi Module.
  • WooCommerce Gravity Forms Product Add-ons by Lucas Stark.
  • ACF fields of type Text, Text Area, and WYSIWYG. Disabled by default, please see FAQ for more details.
  • Beaver Builder. It will detect Gravity Forms shortcodes added to a Text Editor module.
  • Ultimate Addons for Beaver Builder Gravity Forms Styler module.

If you’re not using any of the above embedding methods you can still use Fresh Forms with a filter to pass the ID number of the posts where you want to run Fresh forms. Please see FAQ for more details.

There’s no options page, and nothing is saved on the database. Nothing!

It should work with any caching plugin with support for DONOTCACHEPAGE constant, and proxies respecting the use Cache-Control HTTP header.

Caching plugins supported:

  • Autoptimize
  • Comet Cache
  • Hummingbird
  • Kinsta Cache
  • LiteSpeed Cache
  • SG Optimizer
  • W3 Total Cache
  • WP Engine System
  • WP Fastest Cache
  • WP Optimize
  • WP Rocket
  • WP Super Cache

Caching plugins NOT supported:

  • Breeze. It doesn’t support DONOTCACHEPAGE constant or filters to skip caching.

CloudFlare and other proxies:

This plugin will add appropriate HTTP header to pages with a Gravity Forms form to exlude the page HTML from caching when the web host setup allows it.

By default CloudFlare doesn’t cache the page HTML, it does only when you have configured it to „Cache Everything“. In this case, after activating the plugin, you need to purge cache in your CloudFlare account or wait for cache expiration to let CloudFlare know the page must be excluded from caching.

Certain hosts like WP Engine and Kinsta don’t allow HTTP headers modification from WordPress side of things, therefore CloudFlare support will not work for these hosts.

Other proxy services should work in a similar way, but I don’t have access to test any other proxy service. Feel to reach me if you want to provide me access to add support for your proxy service (documentation for the proxy would be required).


  • PHP 7.0 or higher.
  • WordPress 4.9 or higher.
  • Gravity Forms 2.3 or higher.
  • Only forms embedded using classic editor shortcode or Gutenberg block are supported.


Just install and activate, no settings page.

Nejčastější dotazy

The plugin is not working in LiteSpeed server

As stated on this plugin description it supports the LiteSpeed Cache plugin, NOT LiteSpeed server directly. So if you’re using a LiteSpeed based web host, you need to install LiteSpeed Cache plugin before installing Fresh Forms for Gravity.

I want to enable ACF support

ACF fields of the following types are supported as standalone fields and also as subfields of a Flexible Content or Repeater field: Text, Text Area, WYSIWYG.

To enable ACF support add the following line to your theme’s functions.php file or a custom functionality plugin.

add_filter( 'freshforms_acf_support', '__return_true' );

I want Fresh Forms to run for certain posts where I’m embedding forms using an embed method that is not supported.

Starting with Fresh Forms 1.3.1 you can use the freshforms_post_has_gform filter in your theme functions.php file or a custom fucntionatliy plugin to pass Fresh Forms an array containing the ID of the posts where you want it to run without performing the usual automatic detection of forms.

The following example would exclude posts with ID 1 and 8:

add_filter( 'freshforms_post_has_gform', 'fffg_fresh_these_posts' );
function fffg_fresh_these_posts(){
    // Force Fresh Forms to run for posts with id 1 and 8.
    return array( 1, 8);

The following example would exclude WooCommerce products using a product category with the slug product-category-1

add_filter( 'freshforms_post_has_gform', 'fffg_fresh_these_products' );
function fffg_fresh_these_products( $post_has_form ){
    global $post;

    // Run Fresh Forms for a WooCommerce product if it has one of the following categories slugs.
    $product_categories = array( 'product-category-1' );
    if ( is_object( $post ) && 'product' === $post->post_type && has_term( $product_categories, 'product_cat', $post->ID ) ) {
        return array( $post->ID );

    // Otherwise.
    return $post_has_form;


28. 8. 2020
The plugin saves you a lot of time and effort when dealing with caching and Gravity Forms with a classic, clean and lightweight efficiency! The latter update, which added some support to ACF is yet another wonderful addition. Samuel Aguilera is extremely responsive and efficient. I appreciate the thoughtful and brilliant collaboration to the open source community.
11. 5. 2020
As regular users of Gravity Forms and a certain leading WP host, we recently hit the first time an issue with cached data getting attached to the wrong form submission - a potential nightmare. The host was able to disable caching on the form page, but we'd have to go and ask them every time we created a new form, which is a pain. So we found Fresh Forms for Gravity which solves the problem! Except - it doesn't work with our host! Except - it does now, thanks to way-beyond-the-call-of-duty support from Samuel in testing, identifying a solution and implementing it in a new release, all incredibly quickly. Problem all sorted for the future and we are very grateful.
6. 5. 2020
I just wanted to shoot you a quick note about this nifty little plugin you created. First, let me say, please at the very least put up a way for people to donate to you if they can. This plugin saved me a ton of headaches and is now living on all the sites where I have Gravity Forms installed - for god's sake, sell this little sucker. Genius. This is just genius. You may want to consider the pricing model the One Dollar Plugin guy uses, $1 per month, $12 per year. This makes it affordable for the very little guys. Second, just a good ol' fashioned THANK YOU! You get the hero of my day award. Seriously. The awards' not worth a damn thing but you got it anyhow. A sure fan here!
Přečtěte si všechny 3 recenze


Fresh Forms for Gravity je otevřený software. Následující lidé přispěli k vývoji tohoto pluginu.


Přehled změn


  • Added filter freshforms_post_has_gform to force Fresh Forms to run without checking if there’s a form. See FAQ for more details.


  • Added support to detect UABB Gravity Forms Styler module. Thanks to Kellen Mace for the Beaver Builder module detection code
  • Added new Signature add-on page parameter to SG Optimizer exclusions. Thanks to Richard Wawrzyniak for pointing it.
  • Added additional domains for SG Optimizer external scripts exclusions.
  • Fixed JS scripts exclusions for Autoptimize. Thanks to Richard Wawrzyniak for pointing it.


  • Added another SG Optimizer exclusion to prevent SG Optimizer from breaking Stripe Checkout redirection. Thanks to Richard Wawrzyniak.


  • Added support for forms embedded using the WP Tools Gravity Forms Divi Module plugin.


  • Added support to detect a Gravity Forms form embedded into ACF fields of Text, Text Area, and WYSIWYG type as subfields of a Repeater field.
  • Added support for Essential Addons for Elementor Gravity Forms widget.
  • Fixed a warning when the post has an ACF Flexible Content field but is empty.
  • Refactoring of some code.


  • Added more SG Optimizer exclusions.
  • Added support to detect a Gravity Forms form embedded into ACF fields of the following types as standalone fields and also as subfields of a Flexible Content field: Text, Text Area, WYSIWYG.
  • Added support to detect a Gravity Forms form embedded into WooCommerce product using WooCommerce Gravity Forms Product Add-ons by Lucas Stark.
  • Minor code changes.


  • Added an exclusion for SG Optimizer to prevent an issue with form redirection inline script due to the „Combine JavaScript Files“ feature, that despite of its name also affects to inline scripts. Thanks to Richard Wawrzyniak.
  • Added an exclusion for SG Optimizer to prevent an issue with the Signature page not displaying the image due to the „Minify the HTML Output“ feature. Thanks to Travis Lopes.
  • Added an exclusion for SG Optimizer to prevent an issue with the PayPal Commerce Platform Add-On due to the „Defer Render-blocking JS“ feature.
  • Added additional exclusions of inline JS and files for SG Optimizer.


  • Added additional checking for Gravity Forms shortcode and blocks when a reusable block is used. Thanks to Richard Wawrzyniak.


  • Added support for Kinsta Cache.
  • Added support for Autoptimize.
  • Minor tweaks to SG Optimizer and WP Engine System support.


  • Improved WP Engine System support.
  • Added support for SG Optimizer.


  • Fixed a few notices.


  • Fixed issue with shortcode detection.
  • Added support for WP Engine System.


  • First public release.