bookmark_borderWP Config Options
The following options are available for general use.
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.
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.
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' );
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
- 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.