PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Stored Data Structure

  1. Bawn
    Member

    Hi. I am becoming very interested in this plugin after reading a lot of great reviews online but before I buy I have some questions. I will start with this one...
    What is the structure of the data stored in the database? For example: If I type my name into a form and press submit, what would show up in the database?

    I have been using other plugins for forms recently and the data structure is not to my liking.
    This is some of what was in the db when I entered my name into a form ad pressed submit.
    s:2:"id";s:2:"33";s:5:"label";s:4:"Name";s:5:"value";s:5:"David";
    The only values I am really interested in here are the label (Name) and the entered data (David).
    Does GF Store it in an more easily accessible manner?

    Posted 12 years ago on Monday April 9, 2012 | Permalink
  2. In Gravity Forms, there are two main tables that hold entry (lead) information. wp_rg_lead and wp_rg_lead_detail. wp_rg_lead holds one record for each entry. It has basic entry data such as id, date created, status, etc..., but it doesn't hold the actual field values. Those are stored in the wp_rg_lead_detail table. One record will be created for each field in your form. So, lets say you submit a form that has a name and email fields. The following will happen:

    Note: This is a simplified version of the tables. In reality, they have many other columns, but this is the basic structure
    -----------------------------------------------------------
    wp_rg_lead
    id date_created
    1 2012-4-9
    -----------------------------------------------------------
    wp_rg_lead_detail
    id lead_id field_number (field_id) value
    1 1 1 David
    2 1 2 david@domain.com

    Posted 12 years ago on Monday April 9, 2012 | Permalink
  3. Bawn
    Member

    Thank you for the reply.

    Posted 12 years ago on Tuesday April 10, 2012 | Permalink