Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    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

    (@iceberk)

    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

    (@iceberk)

    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

    (@msimpson)

    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.

    Thread Starter iceberk

    (@iceberk)

    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

    (@msimpson)

    There is no way to query for the name of the form.

    Thread Starter iceberk

    (@iceberk)

    Ok thank you

    Thread Starter iceberk

    (@iceberk)

    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

    (@msimpson)

    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

    (@iceberk)

    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

    (@msimpson)

    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 but in this case I think you would need to write your own custom PHP Transform Class (similar to how the ComputeMax class on that page) to plug into the “trans” clause of the short code.

    Thread Starter iceberk

    (@iceberk)

    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

    (@iceberk)

    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.