Title: Include form Name as a column
Last modified: September 1, 2016

---

# Include form Name as a column

 *  [pachucote8](https://wordpress.org/support/users/pachucote8/)
 * (@pachucote8)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/include-form-name-as-a-column/)
 * I’m new with this, so, please be patient!
    🙂
 * I’m tryng to get all info I’ve got on all my contact forms.
    I’m creating my 
   own short code, but first, I don’t know how to get lines from my “PHP code that
   outputs the HTML you want to see for one entry”
 * second, I want all the info for all my forms, I do understand that I must use‘*’
   to do this, but then, how could I know from wich Form does it comes every row?
   Can I include form name as a column???
 * Thanks for your help an patience!!!
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/include-form-name-as-a-column/#post-7514501)
 * The example on that page: [http://cfdbplugin.com/?page_id=444](http://cfdbplugin.com/?page_id=444)
   
   shows it. Each form field can be referenced via `$row['field-name']` in the code(
   substituting field-name for an actual field name). Then you can echo the HTML
   you want.
 * This might be easier to use a [[cfdb-html]](http://cfdbplugin.com/?page_id=284)
   shortcode instead of writing a custom shortcode in PHP. What logic are you trying
   to include that you want to write PHP?
 * You can’t include the form name in a column unfortunately.
 *  Thread Starter [pachucote8](https://wordpress.org/support/users/pachucote8/)
 * (@pachucote8)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/include-form-name-as-a-column/#post-7514667)
 * Well, basically, we need to generate reports from all contact forms, so I want
   to create only on view of all, so we don’t have to enter each form DB to get 
   info.
    Is there any way to insert info in another database (MySql, etc) before
   Email will be sent??? thanks in advance.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/include-form-name-as-a-column/#post-7514684)
 * CFDB doesn’t support inserting into another database or table. You would have
   to use the exiting hooks in CFDB or in your form plugin to save the data where
   you want it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Include form Name as a column’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/include-form-name-as-a-column/#post-7514684)
 * Status: not resolved