Handy Code Snippets for Gravity Forms on your Child Site

Code-Snippets-for-Gravity-Forms

Gravity Forms is a solid, easy-to-use form plugin which has a number of add-ons and free plugins.

Gravity Forms has a number of filters, actions, and hooks which allow you to modify most parts, using code snippets. MainWP has an easy-to-use extension for code snippets, so you can save a code snippet to any connected child site.

The first of the useful code snippets for Gravity Forms is to change the default save and continue function in Gravity Forms, from the default of 30 days to a longer 90 days.

The second snippet is to disable automatic plugin updates for the core Gravity Forms plugin. This would be useful when you want to manually update the Gravity Forms plugin on a staging site, first to test before updating.

The next code snippet is where you wanted to require the card holder field on a form which has product fields and has a payment feed set on it.

Gravity Forms has a country select field. If you wanted to remove a country in the country select field, you can define the country, and use this code snippet.

The final code snippet applies if you are already using the Akismet plugin and service on your child site; Gravity Forms already has default integration with it. To send a specific form to Akismet, you can use this code snippet. If you needed to globally disable the Akismet integration in Gravity Forms, you can use this code snippet.

Easily adding code snippets to your connected child sites (which have Gravity Forms installed and activated) will allow you to easily make changes, as needed.

1 thought on “Handy Code Snippets for Gravity Forms on your Child Site”

  1. Hello,
    Good work you doing here.
    I am current using Gravity form Ver 5.2.2 on my website.
    I want to add a field in the export enteries section of the plugin
    that requires uses to enter the “form ID” before they can export enteries of a particular form. Such that enteries can only be exported when the correct form ID is entered.
    Could you help with a code snippet for this?
    Thanks.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay Connected with MainWP

Sign up here to receive latest MainWP News and Notifications

Get Started With MainWP Today!

Stop letting your sites manage you and start managing your sites.