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. The same applies to certain automatic JS optimizations done by caching plugins that are known to break JS execution easily. An easy solution is to configure your caching plugin or proxy to exclude the page where the form is embedded, 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: Flush current cache on plugin activation. This is required in order to allow the next step to run. Dynamically check if there’s a Gravity Forms for any of the supported embedding methods (see below for the list). 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. ACF fields of type Text, Text Area, and WYSIWYG. Disabled by default. Avada. The following elements has been proven to work: Content Boxes, “Gravity Form”, Modal, Text Block. Other elements could work too, but not tested. Beaver Builder. It will detect Gravity Forms shortcodes added to a Text Editor module. Conversational Forms add-on. It will automatically detect any form page using the conversational_form post type (requires Conversational Forms add-on 1.3.0+). 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… Elementor. The following widgets added to the post content are supported: Shortcode, Text. Essential Addons for Elementor Gravity Forms widget. GravityKit Gravity Forms Widget for Elementor. PowerPack for Beaver Builder Gravity Forms Styler module. Ultimate Addons for Beaver Builder Gravity Forms Styler module. Ultimate Addons for Elementor By Brainstorm Force. WooCommerce Gravity Forms Product Add-ons by Lucas Stark. WPBakery Page Builder. The following elements has been proven to work: “Gravity Form”, Text Block. Other elements could work too, but not tested. WP Tools Gravity Forms Divi 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. You can also make Fresh Forms to add a cookie when a form is detected to use this cookie as a way to skip caching for hosts using Varnish based caching. Please see FAQ for more details. There’s no options page. Only the plugin version is saved to the database to be able to handle actions after an update when needed, no other data is stored. It should work with any caching plugin with support for DONOTCACHEPAGE constant, and proxies respecting the use Cache-Control HTTP header. Caching and Optimization plugins supported: Autoptimize Cache Enabler Comet Cache Hummingbird Kinsta Cache LiteSpeed Cache Page Optimize (Script concatenation only) Perfmatters (Delay JS exclusions only) Speed Optimizer (by SiteGround, the plugin with more name changes in the history of WordPress!) Surge 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. Check FAQ for a workaround. NitroPack. It doesn’t support DONOTCACHEPAGE constant or filters to skip caching. Check FAQ for a workaround. Cloudflare and other CDN/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). Note for these cases (caching is done by an external service), Fresh Forms can just include the HTTP header when your web host allows it. Once the header is added, it’s up to the CDN/proxy being used to obey the header and skip caching for the page. Requirements 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. Usage Just install and activate. No settings required except for ACF support (see FAQ).
Top keywords
- forms17×1.95%
- caching16×1.83%
- page14×1.60%
- cache12×1.37%
- gravity12×1.37%
- gravity forms10×1.15%
- form9×1.03%
- work8×0.92%
- supported7×0.80%
- text7×0.80%
- wp7×0.80%
- proxy6×0.69%
GF No Duplicates
Gravity Forms already has some built-in duplicate submission prevention techniques, including the No Duplicates setting for a field in your form, preventing the same field value from being used multiple times for the same form. Using this setting is a rock solid approach to avoid duplicate submissions, but it requires having a field in your form that you can consider as a source of unique data per submission. This add-on helps using the same idea, without requiring having a field to enable the No Duplicates setting, by dynamically adding a hidden input with a random token to the form, and checks the POST request received for this token value to prevent duplicate submissions. This will stop identical POST requests from being accepted for entry creation, like the ones that some browsers will send when the browser back or refresh buttons are clicked or when browser tabs are restored in mobile devices. Limitations If for any reason the visitor manually fills the form with the same information, and submits it again, blocking this visitor’s behavior is not within the scope of this plugin functionality. To put in another way, the add-on is intended to block automated resend of the same POST request data, it doesn’t block submissions voluntarily initiated by the visitor. If your site is still receiving repeated POST requests created before enabling the add-on, therefore not containing the token field, you would still receive duplicates for these entries. There’s no way for the add-on to be able stop duplicates for requests created before enabling the add-on. How it works: When the add-on is enabled a hidden input with a random token as value is added to each form dynamically in the front-end. When a POST request is received and handled by Gravity Forms, GF No Duplicates checks if this POST request has the token and if its value was used already in an existing entry for the form tied to the POST request. If the token parameter exists but is empty or there’s any form entry where the token value was used already, GF No Duplicates stops the submission. The form is replaced with an error message, which contains a link to the form page, suggesting the visitor to click the link to start a fresh new submission. Requirements PHP 7.0 or higher. WordPress 4.9 or higher. Gravity Forms 2.5 or higher. The page where the form is embedded must be excluded from cache (if you use any caching plugin or server cache, see note below). Usage Install and activate it as you do with any other plugin. Enjoy! Optionally, you can customize the duplicate submission message shown to users from the settings page or using a filter (see the FAQ). Note about Caching The add-on functionality relies on a random token generated dynamically, so for obvious reasons caching the page where your form is embedded would prevent the add-on from working as expected. This is not a limitation of the add-on but the expected if you’re serving a static version of your page, which is the only reason to cache a page, you shouldn’t never cache pages where you expect dynamic data. Most caching plugins provide you a way to exclude URLs from cache, this is for a reason, use it. There are some web hosting providers using cache at server level and not providing their customers with an interface to exclude URLs from cache (e.g. WP Engine, Kinsta, …), you can still ask your host support staff to add the exclusion for you. You can also use Fresh Forms for automated cache exclusion if you use any of the embedding methods and caching plugins supported (see Fresh Forms description for more details).