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.

Send form entries to multiple databases

  1. I would like to know how this is possible with Gravity Forms. Once the plugin is installed how can I send the data collected in one form to two different databases? The plugin just has an option for that or I would have to write some function in the functions.php file?
    Thanks!

    Posted 12 years ago on Friday March 23, 2012 | Permalink
  2. I'm working on this project as well, and we're still trying to work this out. Here's what we're trying to accomplish:

    We have one form that submits data to a third party site. That form is very simple and works fine. We want to create a Gravity Form that will not only save all entries submitted to the Gravity database but will also send each submission to the third party site. Essentially, we need to be able to send to two forms using a single submission.

    We have two hurdles. One, how do you specify the field ID for the fields in Gravity? We need to use specific IDs because it's required by the third party database. The second issue is getting the Gravity form to submit to the third party form at the same time. I've seen some solutions to this online but I'm wondering if anyone here has something that they know works with Gravity.

    Thanks!

    Posted 12 years ago on Friday March 23, 2012 | Permalink
  3. Gravity Forms does not save data to an external database. It only saves the form entry data to the Gravity Forms database tables in your WordPress database.

    If you need to store data from the form in an external database you would have to do so by writing a customization using custom PHP and available hooks/filters. All of the Gravity Forms API hooks and filters are documented in the developer documentation area of the support site here:

    http://www.gravityhelp.com/documentation/page/Developer_Docs

    The hook you would most likely use for what you describe would be the gform_pre_submission hook or the gform_after_submission hook depending on when you want your code to execute. Those hooks will have access to the form data and then you can use custom code to put that data where you want it to go.

    The field id's are dynamic and are created when a field is added to a form. They are unique to each form and are not customizable. But the field id's aren't important for what you want to do because if you are using custom code to send the data to a 3rd party... you have full control of how that happens. The hooks above have access to the form object or the entry object (depending on which hook you use) containing the data, you would then write custom PHP to do whatever it is you need to do with that data.

    Any custom code you write using these hooks would go either in your themes functions.php or you could create your own custom WordPress plugin that you then activate to house this customization.

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  4. Do you have anyone on staff who can do this custom scripting for us?

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  5. I am looking to save data collected in a GF user registration form to both the users and user meta tables and another table where I'm collecting data for a mapping plugin within the WordPress database. I guess what I'm asking is, how do I get my data into that mapping plugin table.

    Thanks.

    Posted 12 years ago on Tuesday April 10, 2012 | Permalink
  6. I wonder if this is what you are looking for: http://www.0to5blog.com/creative/gravity-forms-submitting-forms-to-3rd-party-applications/

    Hope it helps!

    Posted 11 years ago on Wednesday July 11, 2012 | Permalink
  7. David Peralty

    Very cool tutorial. The post_submission hook is very powerful and can be used to push form elements to any database table with some PHP coding.

    Posted 11 years ago on Wednesday July 11, 2012 | Permalink