General OptionsGF_THEME_IMPORT_FILEGF_LICENSE_KEYMulti-Site Specific OptionsGF_RECAPTCHA_PRIVATE_KEYGF_RECAPTCHA_PUBLIC_KEYGF_IMPORT_FILECreating a Form Import JSON File
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.
1define( 'GF_THEME_IMPORT_FILE', 'path/to/gf_import.json' );
Note: The path is relative to your theme root.
GF_LICENSE_KEY
Setting this option before installing Gravity Forms on a single site WP installation or before creating new sites on a multisite install will automatically pre-populate your Gravity Forms license key for those new installations.
1define( '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.
12define( '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.
1define( '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.
Create the initial set of forms you want to replicate.
Navigate to the Import/Export tool and select 「Export Forms」.
Select the forms you want to auto-replicate when a new site is created.
Click 「Export」 to export them to an JSON file.
Place the JSON file somewhere on your web server, such as your wp-content/uploads/ folder, or somewhere easily accessible.
Replace the URL in the example code above with the URL to your Form JSON file.