Everything You Need to Know About Gravity Forms Database Structure (2024)

Everything You Need to Know About Gravity Forms Database Structure (1)Writer Ellipsis

/Updated January 19, 2023 /8 Comments

  1. Gravity Forms SQL Tables
    1. Form Data
    2. Entries Data
    3. Add-On Data
  2. Where are these SQL Tables stored?
  3. Forcing Gravity Forms Database Updates
  4. Integrate Gravity Forms with a Database
  5. Final Thoughts

Everything You Need to Know About Gravity Forms Database Structure (2)Gravity Forms is a plugin to create custom forms for a WordPress site. Since its release, it has developed into a mature, stable WordPress form plugin that webmasters have grown to trust to create advanced forms quickly. If you use Gravity Forms, the admin settings generally provide you sufficient cover to manage the structure and content of your forms. In this post, we discuss the structure of the Gravity Forms database.

Gravity Forms is a critical plugin for dynamic, interactive websites powered by WordPress today. It provides powerful features like drop-down WYSIWYG form creation and conditional logic to create multi-page forms. While the GUI of Gravity Forms can enable you to access the entirety of the plugin, special conditions may require the knowledge of the underlying database structure. If you find yourself in a situation where your database gets corrupted, knowledge of the database structure may be of help. Additionally, it may be a good idea to understand how you store and process the end user’s data from the frontend to the backend in the GDPR compliance era.

First, we explore what constitutes the Gravity Forms database — its SQL tables and their interlinkages. Then, we move on to various ways of accessing the Gravity Forms database, how you can force an update and integration of the database with a different source.

Gravity Forms SQL Tables

In this section, we discuss the new structure of the Gravity Forms database. We also assume that you used the “wp_” prefix for all WordPress tables during the installation of your WordPress site. If your site’s settings use a different prefix, it would appear in place of “wp_” for all table names below. In addition to this prefix, all Gravity Forms database tables have a “gf_” prefix for all table names.

We have divided this section into tables related to three broad categories — forms, entries, and add-ons. You can find the data of every interaction you have with the Gravity Forms plugin in one of the tables described below. The database tables for the Gravity Forms plugin contains all relevant data related to the plugin. These tables store form metadata, various form fields, saved data for form submission at a later stage and submitted form data. Any interaction through the Gravity Forms API also results in entries into the same database tables.

Form Data

The basic information about a form that one may create is stored in the table wp_gf_form. It contains the form name, date of creation, and whether the form is currently active. The table wp_gf_form_meta contains the metadata of each form, which includes display information and configuration information. The table wp_gf_form_view stores information on form views. Each row in the meta and view tables are linked to a single form in the wp_gf_form table.

Entries Data

When you submit a form in Gravity Forms, it creates an entry. The wp_gf_entry table stores details about the Entry Object. Any entry data for a form is stored in this table. The basic data elements of this table are the form to which it belongs, the user associated with the entry, related timestamps, and payment and transaction details if applicable. If your form has the “Save and Continue” feature, the table wp_gf_draft_submissions saves intermediate data until the user submits the form. Did you know you can edit entries on the front end too?

There are two other tables that support the wp_gf_entry table. The wp_gf_entry_meta table contains the meta description of an entry object. This metatable may also contain add-on details if present. If an entry contains entry notes, the table wp_gf_entry_notes stores the textual data.

Add-On Data

In addition to the form and entry tables, the Gravity Forms plugin creates three tables to support its add-ons. The wp_gf_addon_feed is the primary table that stores necessary information about any add-on. This table contains data on add-ons that may be linked to the wp_gf_entry table.

If an add-on requires the user to make a payment, the wp_gf_addon_payment_transaction and wp_gf_addon_payment_callback tables store the transaction and callback details, respectively.

Where are these SQL Tables stored?

While we have discussed the structure of the tables, there are many methods through which you can view these tables. If you use MySQL or MariaDB as your WordPress database, you can use phpMyAdmin to view the structure and contents of these tables. Alternately, MySQL, and MariaDB provide a command-line interface that lets you query the tables through the terminal.

Forcing Gravity Forms Database Updates

With the release of Gravity Forms 2.3, several tables were deprecated and should not be used. Future updates may also lead to changes in the database structure. Therefore, when you update the Gravity Forms plugin, you may encounter an error in the plugin due to the failure in the database modification.

Gravity Forms has a feature to manually run the database modification script after you have updated the plugin. In the WordPress admin dashboard, select the System Status option under the Forms menu. In the Database section, choose the option to “Re-run database upgrade” to port your database tables from the old structure to create new tables. As this process involves changing tables in your database directly, it is a good idea to backup your database in case the process fails and corrupts the plugin.

Integrate Gravity Forms with a Database

We have explored how Gravity Forms stores its data within the database that your WordPress site runs on. At this point, you may wonder whether it is possible to store the data of Gravity Forms in a different database, within the system that runs WordPress or in an external source.

While it is possible to achieve this integration, the easiest way to do so is through an add-on, wpDataTables. Once you have purchased and installed both Gravity Forms and wpDataTables, you can set up an external data source for an existing form with entries. You can also add wpDataTables data into a Gravity Form with GP Populate Anything.In case you are skeptical of starting the complex migration, wpDataTables provides a sandbox environment to test the whole process before you make a final decision. It is, however, difficult, though not impossible, to automate the process of complete migration from the existing database source of Gravity Forms.

Gravity Forms Google Sheets automatically syncs your Gravity Forms data with Google Sheets, which integrates with Data Studio (aka Looker Studio), BigQuery, and others.

Final Thoughts

In this tutorial, we discussed the need to understand the structure of the Gravity Forms database. We explored various tables that form the base for the functioning of Gravity Forms. Next, we looked at the process of forced database modifications for the plugin on an update. Finally, we analyzed the process of integration of Gravity Forms with an external database.

You need Gravity Perks to get the full power of Gravity Forms! Buy Gravity Perks today to all of our galactic Gravity Forms plugins!

  • Buy Now

Did this resource help you do something awesome with Gravity Forms?

Then you'll absolutely love Gravity Perks; a suite of 47+ essential add-ons for Gravity Forms with support you can count on.

View All PerksBuy Now

  1. Everything You Need to Know About Gravity Forms Database Structure (3)

    Cv KambojMay 19, 2021 at 12:41 am

    hi does this work with nest gravity form ?

    Reply

    1. Everything You Need to Know About Gravity Forms Database Structure (4)

      Samuel BassahStaffMay 19, 2021 at 6:44 am

      Hi CV,

      Nested Form entries are stored just like normal Gravity Forms entries. So yes, it also applies to Nested Forms.

      Best,

  2. Everything You Need to Know About Gravity Forms Database Structure (5)

    NBJanuary 13, 2021 at 12:32 am

    Ryan, would be great if you threw in some sample MySql queries – e.g. show me all the entries (field names and entry values) for a specific form, etc.

    Reply

    1. Everything You Need to Know About Gravity Forms Database Structure (6)

      Ryan DonovanJanuary 13, 2021 at 10:02 am

      Hello There, Thank you so much for the recommendation. We have noted this and may add this as we update our documentation. Thank you so much again!

  3. Everything You Need to Know About Gravity Forms Database Structure (7)

    JackMay 28, 2020 at 12:50 pm

    ThanksI am looking for the database record where the chosen currency is stored it must be in the database and not on php level I think that because I have a multi/networked site with for each subsites own currencies

    Reply

    1. Everything You Need to Know About Gravity Forms Database Structure (8)

      Ryan DonovanMay 28, 2020 at 2:38 pm

      Hey Jack, Just confirmed with the development team and GFCommon::get_currency() will provide them with the current currency that Gravity Forms is using.That’s a PHP function/method straight from Gravity Forms. Something to note is it does pull the rg_gforms_currency option in the wp_options table on the database if it’s set.

  4. Everything You Need to Know About Gravity Forms Database Structure (9)

    jack SchneiderMay 28, 2020 at 5:21 am

    It is a nice description of the database usages but I mis the place where the gravity options are stored in the database probably in the wp_options table but I can not find them.I need that because with the default currency must be filled in and we have a lot of subsites.

    Gravity forms has been update and somtimes the currency is not find but form execution crashes when currency is empty. even when there is no currency field on the form.

    Reply

Leave a Reply

Everything You Need to Know About Gravity Forms Database Structure (2024)

FAQs

Where do Gravity Forms store data? ›

ALL of the data received via your form submissions is stored in tables in your own WordPress database on your own hosting provider.

What is the purpose of Gravity Forms? ›

Gravity Forms is a WordPress plugin that allows site owners, admins, and developers to create simple and complex forms to collect information on their WordPress site and then decide what to do with that information.

What is WP_GF_entry? ›

The wp_gf_entry table stores details about the Entry Object. Any entry data for a form is stored in this table. The basic data elements of this table are the form to which it belongs, the user associated with the entry, related timestamps, and payment and transaction details if applicable.

How to create a table in gravity form? ›

To add a table to your form, navigate to the Gravity Forms visual form editor. Now, open the “Advanced Fields” tab on the right and add a “List” field to your form by dragging and dropping it into place. The List field in Gravity Forms allows users to add/remove additional input rows up to some fixed amount.

Where do I put CSS for Gravity Forms? ›

From your site admin dashboard, click the Appearance option. Under Appearance, choose Customize. That will be take you into the theme customizer, where you can find the Additional CSS tool.

Does Gravity Form have an API? ›

Gravity Forms has an extensive developer API that can be used to access and extend default functionality. Following is a brief description of the different areas of Gravity Forms' API. Understanding the purpose of these different areas is important to make sure the right API is used.

Why are Gravity Forms so good? ›

To recap, some of the main benefits of choosing Gravity Forms are as follows: An easy-to-use visual, drag-and-drop form builder interface. Powerful built-in features such as conditional logic, multi-page forms, calculations, dynamic field population, and more.

What are three reasons gravity is important? ›

Gravity is what holds the planets in orbit around the sun and what keeps the moon in orbit around Earth. The gravitational pull of the moon pulls the seas towards it, causing the ocean tides. Gravity creates stars and planets by pulling together the material from which they are made.

Is gravity form only for WordPress? ›

Gravity Forms requires WordPress to work. To get a Gravity Form onto a site which is not using WordPress, you can host the form on another site (a WordPress site) and iFrame it into your non-WordPress site.

How do you delete gravity forms? ›

Deleting a form is just as simple as adding a new one! On the Forms homepage, you can just hover your cursor over the form you wish to delete and click Trash. You can also delete a form from within the form itself as well.

Can Gravity Forms do calculations? ›

The Gravity Forms calculations functionality lets you use mathematical formulas to perform calculations based on input from the form submitter. Users can enter numbers directly in the Number field.

Is Gravity Form free? ›

Gravity Forms only comes in a premium version, while some other popular form plugins have free versions that are available at WordPress.org.

In what form is data stored in? ›

Computers store data in binary form as it is the language that is understood by the computer. The processor converts the commands and information given by the user into binary data for the computer to execute them. Binary data is numerically represented by 0s and 1s.

How does gravity keep everything in place? ›

Gravity exerts a force of attraction between any two objects—the Earth and you, for example. Its strength depends on the amount of mass (matter) each one has and on how far apart their centers are. The more mass something has, the more gravity it has.

How to export Gravity Form data? ›

First, log into your WordPress admin dashboard. Once logged in, hover over Forms on the left side navigation menu and click on Import/Export. Once on this page, you will notice a few different options. Click on the second option labeled Export Forms.

How do you extract Gravity Form data? ›

Exporting forms from Gravity Forms

First, log into your WordPress website, then hover over “Forms” in the left-hand menu and click on “Import/Export”. Next, click on the “Export Forms” tab on the left, choose the form you want to export, and click on the “Download Export File” button.

References

Top Articles
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 5755

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.