Title: Multiple forms submit to one database
Last modified: August 22, 2016

---

# Multiple forms submit to one database

 *  Resolved [willbell](https://wordpress.org/support/users/willbell/)
 * (@willbell)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/)
 * I have seven forms. Each one opens opens a pdf brochure unique to that form once
   it has been filled out and SEND is clicked. But I would like the data from the
   forms to all go to the same database, i.e. People who have asked for a brochure.
 * I have seen some discussions about this but I couldn’t understand how to implement.
 * Thank you.
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

Viewing 14 replies - 31 through 44 (of 44 total)

[←](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/?output_format=md)
[2](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/2/?output_format=md)
3

 *  [lim sungbeom](https://wordpress.org/support/users/lim-sungbeom/)
 * (@lim-sungbeom)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583777)
 * Dear Mr. Simpson
 * Thank you for your answer.
 * I am afriad that I don’t understand what you said exactly at below sentence.
   
   I used ‘Contact Form 7 Multi-Step Forms’ plugin, so you mean that CFDB doesn’t
   consider ‘Contact Form 7 Multi-Step Forms’?
 *  ** CFDB was not coded without taking into account
    ‘Contact Form 7 Multi-Step
   Forms’ plugin.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583778)
 * Sorry about the sloppy english. I meant to write that CFDB was not coded with‘
   Contact Form 7 Multi-Step Forms’ plugin in mind. So there is no special code 
   to deal with this kind of situation.
 *  Thread Starter [willbell](https://wordpress.org/support/users/willbell/)
 * (@willbell)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583779)
 * Moving this post forward in case you missed it. Thank you.
 * Michael,
 * I lied. I have one more question.
 * Let’s say I have three databases and one combined database consisting of data
   from the three.
 * I am looking at the combined database and I see and entry and I need to know 
   which of the three forms that entry comes from. How do I create a column that
   shows which contact form the entry came from, ie. which of the three databases
   the entry on the combined database comes from.
 * Thank you,
    Will
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583780)
 * [@willbell](https://wordpress.org/support/users/willbell/)
 * In your change_title function, before you change the value of $formData->title,
   add a line like
 * `$formData->posted_data['From Form'] = $formData->title;`
 *  Thread Starter [willbell](https://wordpress.org/support/users/willbell/)
 * (@willbell)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583781)
 * Michael,
    Bingo again. And now that my and Lim’s seems resolved, I will mark 
   this as resolved. Thank you very much. Will
 *  [lim sungbeom](https://wordpress.org/support/users/lim-sungbeom/)
 * (@lim-sungbeom)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583782)
 * Thank you very much, Michael Simpson
    I really appreciate your kind response.
   Your advise really helped me. Is there a method to support your activity? I want
   to donate some ,even though not much, to you or your company.
 * myemail [lowhoh@miinfra.com](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/lowhoh@miinfra.com?output_format=md)
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583783)
 * Sorry I couldn’t help you more. If you wish to donate, got to [http://cfdbplugin.com/](http://cfdbplugin.com/)
   and click the Donate button on the right.
 * Thank you.
 *  [lim sungbeom](https://wordpress.org/support/users/lim-sungbeom/)
 * (@lim-sungbeom)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583784)
 * I know, I just thank you for your acheivement.
    I will use this plugin very useful.
   I donate some for your company. I wish it help for your company. and if you are
   possible, please you consider to add combinding funciton for Contact Form 7 Multi-
   Step Forms’ plugin It will be really helpful for multi-step form data management.
 * Have good day!!
 *  [messs17](https://wordpress.org/support/users/messs17/)
 * (@messs17)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583814)
 * Hi Michael,
 * I am using your code and it is working great to consolidate all of my contact
   forms. Thanks for that!
 * Right now, the code makes it so that form entries are only stored in the consolidated
   database. I was wondering if there is a line of code that I can add to the current
   code to make it keep the entry in the original form database in addition to creating
   a duplicate entry in the consolidated database. Is this possible?
 * Thank you.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583815)
 * Have a look at [Changing Data Before it is Saved](http://cfdbplugin.com/?page_id=747).
   You could use that hook to place code to save the information elsewhere instead
   of modifying it.
 *  [messs17](https://wordpress.org/support/users/messs17/)
 * (@messs17)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583816)
 * Thank you for the response Michael. I’m a php novice and am not sure which part
   of my code is removing it from the original database.
 *     ```
       if ($formData && in_array($formData->title, $myForms)) {
              $formData->posted_data['From Form'] = $formData->title; $formData->center['Center'] = $formData->title; $formData->title = $myUnifiedForm;
           }
           return $formData;
       ```
   
 * Above is currently what I have and I can see it is changing the title, but I’m
   not sure what the alternative would be to keep the original title and move a 
   copy of the data to the consolidated database.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583817)
 * When you say database what do you mean:
    1. The MySQL database 2. The table in
   the database that holds all of the form submission data 3. The data associated
   with a specific form name 4. other?
 *  [messs17](https://wordpress.org/support/users/messs17/)
 * (@messs17)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583818)
 * #3, the contact form database with all of the form submission data for a specific
   form. So what I would like is to have the contact form submission placed into
   its correct form name database($myForms) while at the same time duplicating that
   data into my consolidated database($myUnifiedForm) with all of my other forms’
   data. Currently the code takes the form submission data and places it in the 
   consolidated form, bypassing the original form database completely.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583819)
 * There is no simple way to make a form submission into two. Would it make sense
   to keep your forms with their individual titles, but sometimes display a consolidated
   view of several forms together? This can be done by indication multiple forms
   in a short code. For example `[cfdb-table form="form1,form2,form3"]`

Viewing 14 replies - 31 through 44 (of 44 total)

[←](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/?output_format=md)
[2](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/2/?output_format=md)
3

The topic ‘Multiple forms submit to one database’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

## Tags

 * [Contact Form DB](https://wordpress.org/support/topic-tag/contact-form-db/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [Merge](https://wordpress.org/support/topic-tag/merge/)

 * 44 replies
 * 4 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-forms-submit-to-one-database/page/3/#post-5583819)
 * Status: resolved