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

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

/UpdatedJanuary 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 - Gravity Wiz (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 - Gravity Wiz (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 - Gravity Wiz (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 - Gravity Wiz (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 - Gravity Wiz (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 - Gravity Wiz (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 - Gravity Wiz (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 - Gravity Wiz (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

Insights, advice, suggestions, feedback and comments from experts

Based on the information provided in the article, here is an overview of the concepts related to Gravity Forms and its database structure:

Gravity Forms Plugin

Gravity Forms is a plugin for WordPress that allows users to create custom forms for their websites. It is a mature and stable form plugin that offers advanced features such as WYSIWYG form creation, conditional logic, and multi-page forms.

Gravity Forms Database Structure

The Gravity Forms plugin uses a database to store various types of data related to forms, entries, and add-ons. The database consists of several SQL tables with specific prefixes. Here are the main categories of tables:

  1. Forms: The tables related to forms store information about the forms themselves, including the form name, creation date, and active status. The tables include:

    • wp_gf_form: Stores basic information about a form.
    • wp_gf_form_meta: Contains metadata for each form, including display and configuration information.
    • wp_gf_form_view: Stores information on form views.
  2. Entries: When a user submits a form, an entry is created. The tables related to entries store details about the entry objects, including the form it belongs to, user information, timestamps, and payment details if applicable. The tables include:

    • wp_gf_entry: Stores details about the entry object.
    • wp_gf_entry_meta: Contains the meta description of an entry object, including add-on details if present.
    • wp_gf_entry_notes: Stores textual data for entry notes.
  3. Add-Ons: Gravity Forms also creates tables to support its add-ons. These tables store necessary information about the add-ons and their links to the entry table. The tables include:

    • wp_gf_addon_feed: Stores information about add-ons.
    • wp_gf_addon_payment_transaction: Stores transaction details for add-ons requiring payments.
    • wp_gf_addon_payment_callback: Stores callback details for add-ons requiring payments.

Accessing Gravity Forms Database

To view the structure and contents of the Gravity Forms database tables, you can use tools like phpMyAdmin if you are using MySQL or MariaDB as your WordPress database. These tools provide a graphical interface to query the tables. Alternatively, you can use the command-line interface provided by MySQL and MariaDB to query the tables through the terminal.

Forcing Gravity Forms Database Updates

When updating the Gravity Forms plugin, it is important to ensure that the database structure is updated accordingly. The plugin has a feature that allows you to manually run the database modification script after updating. In the WordPress admin dashboard, under the Forms menu, select System Status and choose the option to "Re-run database upgrade" to update the tables. It is recommended to backup your database before performing this process to avoid potential data corruption.

Integrating Gravity Forms with a Database

While Gravity Forms stores its data within the WordPress database by default, it is possible to integrate it with an external database or a different source. One way to achieve this integration is by using an add-on called wpDataTables. With wpDataTables, you can set up an external data source for an existing form with entries or add wpDataTables data into a Gravity Form using GP Populate Anything. It is important to note that complete migration from the existing database source of Gravity Forms may require manual effort and is not automated.

Please note that the information provided above is based on this article. If you have any specific questions or need further clarification, feel free to ask.

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

FAQs

What does gravity Wiz do? ›

Gravity Wiz is a Gravity Forms Certified Developer dedicated to providing helpful plugins, snippets, and tutorials for Gravity Forms.

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.

Where does 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. Please see our statement here https://docs.gravityforms.com/wordpress-gravity-forms-and-gdpr-compliance/ for additional related information.

What is the parent child form in Gravity Forms? ›

The Parent-Child Forms Extension allows Gravity Flow administrators to define Parent-Child relationships between forms. While viewing an entry for a Parent form a new child form can be submitted and linked to the current entry.

How fast does gravity work? ›

Kopeikin and Fomalont concluded that the speed of gravity is between 0.8 and 1.2 times the speed of light, which would be fully consistent with the theoretical prediction of general relativity that the speed of gravity is exactly the same as the speed of light.

Does gravity work instantly? ›

However, gravitational waves, created by the acceleration of mass, are waves of the spacetime 'fabric' itself. According to Newton's theory of gravity, the gravitational interaction between two bodies is instantaneous. However, Einstein's Special Relativity says nothing can travel faster than the speed of light.

Does Gravity Forms 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.

What are 3 things gravity is responsible for? ›

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.

Why is gravity gravity important? ›

Earth's gravity is what keeps you on the ground and what makes things fall. Anything that has mass also has gravity. Objects with more mass have more gravity. Gravity also gets weaker with distance.

Is Gravity Forms worth it? ›

Drag and drop form builder for Wordpress

I highly recommend Gravity Forms for anyone in need of a professional and reliable form builder. Its robust features and ease of use make it a top choice for website owners looking to enhance their website's functionality and user experience.

How many sites use Gravity Forms? ›

Over the course of more than a decade, Gravity Forms has expanded into a robust data management platform powering more than 5 million websites across the globe.

How many websites use Gravity Forms? ›

According to BuiltWith, there are 990,513 live websites currently using Gravity Form. Gravity Form is a WordPress plugin that lets you create custom forms the way you want. This contact form comes with a paid version. There is no free version available.

What is Gravity Forms information? ›

Gravity Forms is a WordPress plugin used originally for contact forms, but in a more general sense, it allows site owners to create forms to collect information.

Who created Gravity Forms? ›

Rocketgenius Inc., the makers of Gravity Forms, was founded by Carl Hanco*ck, Alex Cancado and Kevin Flahaut in 2007.

What is add on nested forms in Gravity Forms? ›

What does Gravity Forms Nested Forms (Gravity Forms Repeater) do? This plugin adds a new Nested Form field type. This field allows you to select another form that will be used to collect “child” entries and attach them to the “parent” entry on submission.

Does gravity do any work? ›

Yes. The work W done on an object by a constant force F over a displacement s is given by W=Fs W = F s . So, for example, the work done on an object of mass m by the earth's gravity as an object drops s meters is about 9.8ms 9.8 m s joules.

What does stronger gravity do? ›

If gravity were just a little stronger in our own three-dimensional world, the curvature of spacetime would be greater, and matter could more easily collapse in on itself.

How high does gravity stop working? ›

If you wanted to reach a point where Earth's gravity no longer has a hold on you, you'd have to fly out about 21 million kilometers, or 13 million miles. That's 87 times farther away than the moon.

References

Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6656

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.