I’m using the cforms plugin on one site at the client’s request, and I needed to access some of the form’s data. Their API didn’t have what I needed, so I thought I’d just query the database directly. But when I looked at the database I didn’t see any tables for it. I thought that was kind of odd, but figured maybe they just used a bunch of wp_options fields, but I didn’t notice anything when I skimmed through the table. Then I thought maybe they were writing out to an XML file, so I looked through the file system, but found nothing. Kind of frustrated, I started skimming through the code to try and figure out where hell it was storing it’s data. I Didn’t find anything solid, so I searched their forums and on Google, and found nothing.
I came back a few days later and skimmed through the code again and eventually figured out that it was using the wp_options table, but only one field. All of the global settings, form settings and form data are stored in a single field, in a serialized format that only an MIT grad on crack could parse by hand.
I added a post to their forums to help anyone else in my position, and also to mention that maybe their approach wasn’t the most intuitive, organized or standard. After a couple of days I checked back to see if anyone had left any comments on it, but it was gone. Lame… How petty and insecure do you have to be to censor criticism?
So anyway, in the end all you really need to do is use get_option() to get an associative array of all of the data.
$cforms = get_option('cforms_settings'); // get the data echo '<pre>'. print_r($cforms, true) .'</pre>'; // output in readable format
Update: Ok, so this is really more a case of me being behind the curve on WP plugin development. Using serialized options is the standard now.