Title: Display result from all forms
Last modified: August 22, 2016

---

# Display result from all forms

 *  [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/)
 * Hello,
 * I want to thank you for such a great plugin firstly.
 * Is there a way to show up all results for col1 from all forms?
 * For example;
 * [cfdb-count form=”All Forms”]
 * or can can I submit to 2 different forms with single form submission?
 * Thank you for your help.
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

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

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554676)
 * In the a short code, use
    `form="*"` to indicate all forms.
 * Similarly you could indicate a subset of forms via
    `form="form1,form2,form3"`
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554762)
 * Thank you for your answer.
 * Sorry if it was indicated in the help documents.
 * I saw that entering multiple form names by hand but I couldn’t see how to shw
   all forms’ entries.
 * Thank you again for this great plugin.
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554790)
 * Hello again,
 * I have one more question;
 * Is there a possibility to show-up the number of forms that the user submitted
   data?
 * Thanks.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554793)
 * If a user was logged in when he submitted then his login is captured in a “Submitted
   Login” field. In a short code, you can add that to a filter
    `[cfdb-table form
   ="your-form" filter="Submitted Login=$user_login"]`
 * See [Identifying Logged-in User](http://cfdbplugin.com/?page_id=116).
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554803)
 * Thank you for your quick answer.
 * But I want a different think. Let me explain it this way;
 * For example I have 20 forms that can be used for users. But one of the user has
   submitted 4 of them. How can i see or query this 4 forms that user entered?
 * In your example, the form is known, but i want names’ of the forms that user 
   submitted till now.
 * Thank you.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554805)
 * There is no way to query for the name of the form.
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554812)
 * Ok thank you
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554918)
 * Hello again,
 * I want to display only one of multiple same entries from field_name. For example;
   
   field_name 1 1 5 3 2 5 1 2 3 3
 * is my table and i want to retrieve and display it as;
    field_name = 1, 2, 3, 
   5
 * all the same values displayed once and the other same values are not displayed.
 * I have tried below code to display as I want;
    $results = $wpdb->get_results(‘
   SELECT DISTINCT field_name FROM wp_cf7dbplugin_submits’, OBJECT );
 * but it outputs “Array”
 * Then I tried this one;
    $results = $wpdb->query( ‘SELECT DISTINCT field_name 
   FROM wp_cf7dbplugin_submits’, OBJECT );
 * and it showed-up the number of entries (output = 4)
 * How can I get this work?
 * Thank you for your answer
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554961)
 * Let’s say your field name was “age” in a form named “Ages” and you want a sorted
   list of all the unique age values. Do it like this:
 * `[cfdb-table form="Ages" show="age" trans="MaxField(age,age)&&NaturalSortByField(
   age)"]`
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554973)
 * Thank you for your answer, I have one more question, i would be appreciated for
   the answer;
 * I want to show the data, that has been entered mostly to a column in wordpress.
   I have this columns in my custom wp database;
 *     ```
       field_name  field_value
       id          1
       entry       489
       Submitted   indirimdeki
       IP          212.156.66.142
       id          1
       entry       689
       Submitted   indirimdeki
       IP          212.156.66.142
       id          1
       entry       750
       Submitted   indirimdeki
       IP          212.156.66.142
       id          1
       entry       790
       Submitted   zamli
       IP          212.156.66.142
       id          1
       entry       790
       Submitted   zamli
       IP          212.156.66.142
       ```
   
 * I need the most popular Word in column “field_value” according to “Submitted”
   within the same form_name
 * In this example the result should be “indirimdeki”
 * How can I manage it?
 * Thank you very much.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554974)
 * So you are looking to compute a statics across several fields. I don’t think 
   there is an out-of-the-box way to do that. There are [Transform to Compute Statistics](http://cfdbplugin.com/?page_id=1167)
   but in this case I think you would need to write your own custom [PHP Transform Class](http://cfdbplugin.com/?page_id=1095)(
   similar to how the ComputeMax class on that page) to plug into the “trans” clause
   of the short code.
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554985)
 * Hello again,
 * I really appreciate your answer.
 * I have found some examples from your plugin site. I think the code below is for
   what I want;
 * `[cfdb-value function="max" form="Deneme" show="Submitted Login"]`
 * but it returns nothing while th code below shows-up the result;
 * `[cfdb-value form="Deneme" show="Submitted Login" limit="1"]`
 * Am I using it in wrong way?
 *  Thread Starter [iceberk](https://wordpress.org/support/users/iceberk/)
 * (@iceberk)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554988)
 * Hello again,
 * I realize that it show only numerical values, so I will try to do that with PHP
   Transform Class as you said.
 * Thank you.

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

The topic ‘Display result from all forms’ 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

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [submit](https://wordpress.org/support/topic-tag/submit/)

 * 13 replies
 * 2 participants
 * Last reply from: [iceberk](https://wordpress.org/support/users/iceberk/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/display-result-from-all-forms/#post-5554988)
 * Status: not resolved