bookmark_borderWP Config Options

General Options

The following options are available for general use.

GF_THEME_IMPORT_FILE

Setting this option allows you to specify a Form JSON file from which a set of default forms can be pre-generated when a theme containing this option is activated. This option should be specified in your theme’s functions.php file. Follow these steps to create a Form JSON file for use with this option.

define( 'GF_THEME_IMPORT_FILE', 'path/to/gf_import.json' );

Note: The path is relative to your theme root.

GF_LICENSE_KEY

Setting this option will automatically pre-populate your Gravity Forms license key when the plugin is installed or updated on a single site installation or when new sites are created on a multisite install.

define( 'GF_LICENSE_KEY', 'YOUR-LICENSE-KEY-HERE' );

Multi-Site Specific Options

The following options are available when using WordPress Multi-Site. All of the options below should be defined in your wp-config.php.

GF_RECAPTCHA_PRIVATE_KEY
GF_RECAPTCHA_PUBLIC_KEY

Setting these options will automatically pre-populate your ReCAPTCHA public and private keys when a new site is created on your Multi-Site install.

define( 'GF_RECAPTCHA_PUBLIC_KEY', 'YOUR-KEY-HERE' );
define( 'GF_RECAPTCHA_PRIVATE_KEY', 'YOUR-KEY-HERE' );

GF_IMPORT_FILE

Setting this option allows you to specify a Form JSON file from which a set of default forms can be pre-generated when a new site is created on your Multi-Site install. Follow these steps to create a Form JSON file for use with this option.

define( 'GF_IMPORT_FILE', 'http://www.domain.com/path/to/gf_import.json' );

Creating a Form Import JSON File

The following steps explain how to create a Form JSON file from which a set of default forms can be pre-generated when used with the GF_IMPORT_FILE or GF_THEME_IMPORT_FILE option.

  1. Create the initial set of forms you want to replicate.
  2. Navigate to the Import/Export tool and select “Export Forms”.
  3. Select the forms you want to auto-replicate when a new site is created.
  4. Click “Export” to export them to an JSON file.
  5. Place the JSON file somewhere on your web server, such as your wp-content/uploads/ folder, or somewhere easily accessible.
  6. Replace the URL in the example code above with the URL to your Form JSON file.