cforms II User Forum

Registration is currently disabled.


Login form protected by Login LockDown.

Lost password?
Advanced Search

— Forum Scope —


— Match —


— Forum Options —


Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS Related Topics
Tracking form data + CSV export
Tags: ***
February 3, 2013
9:18 pm


is it possible to show more fields in the WP admin "Tracking Form Data", I mean more then #, form name, e-mail, date and IP. For example I'd like to see (and use a filter) "subscriber name" or any other fields.

Second question is about downloading Form Data in .CSV. How could I change data sorting? More submissions/entries are exported in a row, not just in max. number of colums (columns = input fields). I'd like to have one entry per row not in more columns.

Hopefully, my questions are clearly described ;-)

Thanks in advance for your help.

February 6, 2013
11:22 pm

I've found solution for my first question:…

Well, I'l try respond as I'll get some success :-)

February 11, 2013
2:43 am

Well, here is a solution how to show up more fields in Tracking WP admin page. Insert this code in "lib_database_overview.php" (in our case under the code ### get results).

//* Custom settings (Del_S - 10.2.2013) - add data from "cformsdata" to result for display $id_result = 0; foreach ($result as $entry) { $id_cust = $entry->id; $sql_cust="SELECT * FROM {$wpdb->cformsdata} WHERE sub_id = $id_cust"; $result_cust = $wpdb->get_results($sql_cust); $obj_cust = new stdClass(); foreach ($result_cust as $entry_cust) { $name = sanitize_title($entry_cust->field_name); // Get sanitize form (Jméno a příjmení -> jmeno_a_prijmeni) $name = str_replace('-','_',$name); // Replacing dashes with underscore $obj_cust->$name = $entry_cust->field_val; $data_cust[$id_result] = $obj_cust; } $result[$id_result] = (object) array_merge((array)$result[$id_result], (array)$data_cust[$id_result]); // Margin 2 objects $id_result++; } print_r($result); //* End of custom settings

Then you'll able to show up your custom form fields. Just like:

$xml .= "jmeno_a_prijmeni )."]]>";

Plus update your "cforms-database.php" @colModel (Java script) with:

{display: '', name : 'jmeno_a_prijmeni', width : 200, sortable : true, align: 'center'},

This code fits @ WP ver. 3.5.1 (cs_CZ – latin ext. chars) and cforms ver. 14.6.

Live form is here: Sign up your kids at Summer workshops for kids and teens ;-)

Hopefuly we'll find some handy solution for exporting CSV – more submissions from same time and form per new line… (We have about 15 forms, because of different capacity at each workshop.)

THX goes to my brother Del_S :-)

BTW. This a third try of submitting a reply. Now in Opera, replying in Chrome failed when dragging a heart captcha icon :-(

February 11, 2013
11:30 pm

Ooops, we're unable to sort data correctly in the CSV file.
Each submitted form is stored in "cformssubmissions" under its "id", but "id" doesn't match to "sub_id"  in "cformsdata". We are getting more inputs in "cformsdata" with same "sub_id".
Then the CSV contains more submissions per row and it's not splitted as 1 input @ 1 row.

Is it some problem in not-well configured cforms? Or could it be a bug? Does anyone have some experiences with similar case?
As I wrote above, we have 15 forms and sometimes we have to delete some incorrect submissions (application forms) to re-enable max. capacity.

Maybe it would be better to start working (re-processing) with XML output, what do you think?

We'll appreciate any links, notes or follow-up questions, thanks in advance.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3761

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5358

Posts: 18739

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)