GravityView is a commercial plugin available from https://www.gravitykit.com. The plugin is hosted here on a public GitHub repository to better facilitate community contributions from developers and users. If you have a suggestion, a bug report, or a patch for an issue, feel free to submit it here.
If you are using the plugin on a live site, please purchase a valid license from the website. We cannot provide support to anyone that does not hold a valid license key.
To install the plugin, download the latest release to your WordPress plugins folder and then activate it.
If you wish to make changes to the plugin, you need to install the necessary dependencies and compile assets. First, a couple of prerequisites:
Make sure that you have the full plugin source code by either cloning this repo or downloading the source code (not the versioned release) from the Releases section.
Install Composer
Install Node.js
npm install -g grunt-cli
if this the first time you've installed Node.js or switched to a new versionNext, install dependencies:
Run composer public-install
to install Composer dependencies, including development dependencies, or composer public-install-no-dev
if you don't need the development dependencies
composer install
or composer install --no-dev
insteadRun npm install
to install Node.js dependencies
To compile/minify UI assets, run grunt
or use the following commands separately:
grunt sass
& grunt postcss
to compile and minify CSS files
grunt uglify
to minify JavaScript files
grunt imagemin
to minify images
You do not have to run the commands if submitting a pull request as the minification process is handled by our CI/CD pipeline.
We offer preconfigured Docker containers and a custom Bash script to facilitate running unit tests using multiple PHP versions in a predictable environment. Visit our Tooling repo for information regarding how to configure and run tests.
If you wish to run tests using your local environment, use the following instructions:
Clone the WordPress Develop and Gravity Forms repositories
In the cloned repository folder, copy wp-tests-config-sample.php
to wp-tests-config.php
, and edit wp-tests-config.php
to define the following constants:
define('DB_NAME', getenv('DB_NAME'));
define('DB_USER', getenv('DB_USER'));
define('DB_PASSWORD', getenv('DB_PASSWORD'));
define('DB_HOST', getenv('DB_HOST'));
Run PHPUnit using the following command (ensure to replace placeholders with your actual system values):
DB_NAME=db_name \
DB_USER=db_user \
DB_PASSWORD=db_password \
DB_HOST=db_host \
GF_PLUGIN_DIR=/path/to/gravityforms \
WP_TESTS_DIR=/path/to/wordpress-develop/tests/phpunit \
vendor/bin/phpunit --no-coverage
Alternatively, you can copy phpunit.xml.dist
to phpunit.xml
, and edit phpunit.xml
to set the environment variables there:
<php>
<const name="DOING_GRAVITYVIEW_TESTS" value="1" />
<env name="DB_NAME" value="db_name"/>
<env name="DB_USER" value="db_user"/>
<env name="DB_PASSWORD" value="db_password"/>
<env name="DB_HOST" value="db_host"/>
<env name="GF_PLUGIN_DIR" value="/path/to/gravityforms"/>
<env name="WP_TESTS_DIR" value="/path/to/wordpress-develop/tests/phpunit"/>
</php>
We are thankful to the following open source software that help enhance our plugin: