cforms II User Forum

Registration is currently disabled.
Guest

FAQs

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
Fetch data from cforms created tables
November 7, 2008
6:15 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

That makes it the wrong thread then. Please don't hijack threads like that it confuses everyone.

Anyway, you're correct. Try a simple example first with no filters.

November 8, 2008
1:55 am
Jon Bounds
Guest

Sorry, as the only thread I could find related to the subject – and it look answerd – seemed the best place to ask. I doesn't work for me at all no mater how simple the query.

November 8, 2008
1:44 pm
bhavesh
Guest

yes..oliver,

We are trying to insert data in the horizontal data format in the database and for that we need to know the  text box name or select box name of the respective forms for the insert query ?

Kindly guide for the same..

thanks

bhavesh

November 8, 2008
2:52 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

simply use the @mail() example in my-functions.php to make cforms send you an email with the data array which will show you exactly how to reference the form fields.

November 8, 2008
5:59 pm
Warren
Guest

Hi,

Just installed and inserted the form in a post.  When I tested the form, I was taken to a blank page and I never received an email.  My host (GoDaddy) does support @mail().

The URL for the blank page is this:

http://matchcoverguy.com/wp-content/plugins/cforms…..omment.php

Any idea of what I need to do to get this to work so that I'll receive the email?

November 8, 2008
6:11 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

what does you issue have to do with the topic of this thread?

*please* do *not* hijack threads! the next posts I'll just delete.

anyway, for a normal contact form, you need to disable the "WP comment form" setting.

August 11, 2012
2:19 pm
Ahmad Mushtaq
Guest

Jon Bounds said
oliver,

I request you to advice on the following…

Is it possible to store the cforms data in the horizontal format in the database  instead of the present vertical format by changing some coding ?

Our developers are accustomed to working in the horizontal data format in the database..Since fetching etc becomes easier if the data is stored in the horizonatl format..

thanks in advance

bhavesh r

Hey Friend,

I know this thread is more than 3 years old but I couldn't stop myself to post sf-wink (What if it helps someone).

If you open and view the wp tables, you will find 2 tables for cforms.

  • wp_cformsdata
  • wp__cformssubmissions

The data in wp_cformsdata is in serialized form and the data in wp_cformssubmissions is in actually a summary for the whole data (I guess).

In order to import the data into another table, we may need to join these both table. Preferably writing a query and then creating a VIEW out of that query. But I dont know the query. sf-wink
I will let you know if I come up with the query or see if someone comes up with any better solution.

BTW Nice plugin Oliver sf-smile

August 11, 2012
3:49 pm
Ahmad Mushtaq
Guest

Jon Bounds said

Please replace the ??? with your data!


[desc]:
_Hi friends,

The data stored in cforms created tables is in vertical format rather than horizontal and I find it difficult to fetch for a display on a different page..

Kindly guide..

thanks in advance

bhavesh ruparelia

Jon Bounds said

Please replace the ??? with your data!


[desc]:
_Hi friends,

The data stored in cforms created tables is in vertical format rather than horizontal and I find it difficult to fetch for a display on a different page..

Kindly guide..

thanks in advance

bhavesh ruparelia

Just figured out the query for converting the vertical data into a horizontal one. You need to know:

  • The field names
  • Unique identifier (SUB_ID in WP_CFORMSDATA and ID in WP_CFORMSSUBMISSIONS)

In my case, first I ran the following query in PHPMYADMIN:

SELECT wp_cformssubmissions.id, (SELECT field_val FROM wp_cformsdata AS myform WHERE myform.sub_id=wp_cformssubmissions.id AND field_name='First Name') AS 'First Name' FROM wp_cformssubmissions

 

The result:

ID  |  First Name

1    |  Ahmad

2    |  Azhar

Finally I created a VIEW using the above query and now I've the data converted into horizontal form. sf-smile

For the remaining field names, you would need to repeat the above steps and simply change the field names in the query.

The query looks ugly but works. Hopefully someone would optimize it. Cheers!

August 13, 2012
12:57 pm
Ahmad Mushtaq
Guest

Now I came to know that I can't perform any update, delete or insert operation on the VIEW because it contains sub queries, and the data is being pulled off from 2 tables. sf-frown

http://dev.mysql.com/doc/refman/5.0/en/view-restri…..tions.html

I think I need to create a separate table and then apply a TRIGGER on the wp_cformssubmissions table. So that whenever any new row is inserted into the latter one, the former one gets updated automatically. Sounds fun! Will update you guys soon.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
29 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: 3750

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5349

Posts: 18719

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

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

Administrators: Oliver (6400), Nicky (3)