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.

Which database table contains the form structure?

  1. My site went down and I've had to re-build my entire database. I've got most of it back online, all apart from Gravity Forms. These are broken and will not display properly. From the UI, it looks like the database is missing information on how the forms were structured. When I click on Edit Forms -> My Form and load the GF UI my form fields and widgets are missing.

    I'm searching through the database trying to find out where this stuff is stored and I can't find it in any of the related tables: wp_rg_form, wp_rg_lead, wp_rg_lead_detail, wp_rg_lead_notes.

    Can you tell me where this data is stored so I can re-build it from a backup?

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  2. Form data is stored in rg_form and rg_form_meta.

    If you imported these tables from a backup then depending on how you imported the tables you may have corruped the serialized array some of the form setup data is stored in. PHPMyAdmin is known to cause issues with serialized array when doing import/exports of tables.

    You can try using the Meta Recovery tool which is available on the Plugin Downloads page. Install and activate it then use the Meta Recovery to try and fix your forms.

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  3. That sounds exactly like what happened, although I've since imported with PHPMyAdmin, Sequel Pro & from the command line. All seem to corrupt your tables.

    I just tried the Meta Tool as suggested and I get the following error on all 5 of my forms:

    This form's meta could not be recovered.

    Do I need to be running 1.5.3?

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  4. Ah, I've just noticed my rg_form_meta table is completely missing. Searching back-up again.

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  5. BTW, at this point in time, it looks as though VaultPress failed to backup my 'wp_rg_form_meta' table, which is why I've been having such maddening issues. I'll update this thread when I discover what happened on their end.

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  6. Now I can't seem to get Version 1.5.2.8 to re-make the wp_rg_form_meta table. No matter how many times I deactivate and reactivate. Can you post the structure for this table?

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  7. @sevendayweeken It won't remake it's tables because it's setup routine isn't going to be triggered. You would have to use the UNINSTALL option on the Gravity Forms Settings page which will completely uninstall it, including tables.

    OR

    You can also try deleting the Gravity Forms option in the wp_options table that is used to store the version number. If there is no version number, it's setup will be triggered. It's how updates know they should run their setup only when necessary.

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  8. OK, thanks. I went with the UNINSTALL option. Now slowly trying to put it back together again.

    Posted 12 years ago on Friday September 30, 2011 | Permalink
  9. Carl,

    You might be interested to note that VaultPress does not properly back-up your plugin db tables. Here's what one the VaultPress safekeepers told me regarding rg_form_meta:

    So, I did some debugging on our end for that missing wp_rg_form_meta table. It turns out that VaultPress can not backup that table because it has no primary or unique keys.

    To ensure that VaultPress will backup this table in the future, try adding an auto-increment primary key or a unique key to that table.

    Adding the auto-inc primary would be the easiest way.

    I was pretty surprised that VaultPress failed in this regard seeing as they market it as such a holistic solution. I guess it demonstrates that relying on one backup solution is foolish. You need at least 2 or 3 at your disposal.

    Posted 12 years ago on Saturday October 1, 2011 | Permalink
  10. Thank you for posting this information. I'll make sure Carl sees it.

    Posted 12 years ago on Saturday October 1, 2011 | Permalink