cformsII Support Forum
Current User: Guest *Frequently Asked Questions*
Search 
Search Forums:


 




Displaying form Submissions in Posts etc

Add a New Topic Reply to Post
Post

Russell Fair - Guest

5:20 am - October 24, 2008

1

Please replace the ??? with your data!


[desc]:
_First of all can I just say, great plugin. I have used cforms for my site for a great while and have loved since day one. I have recomended it to my clientswho use WordPress. I am trying to do something trick for a new site I am working on. I need to display form submissions relative to peoples posts, in a similar fashion to comments. The trick is that I want to give people the option to "agree" or "disagree" in their comment. I think that I am close, but was hoping for some advice, and possibly a quote from someone who is more familiar with the plugin.


Option one. Use the built in comment capability, and simply add a radio or check box for agree or disagree. Ideally I would load two seperate cforms, side by side, one for those who agree, and one for those who do not. Use a hidden value to mark their position and then list them just as regular comments, agrees on the left, disagrees on the right.


The other option, is to use the default function of the plugin,  just as a contact form, and display the results above the form, in a "comment style". The issue here is that I must limit the results only to those relative to that particular post, so I must somehow dynamically transmit the post ID to the database when the form is submitted, as well as pull it when queried. only returning submissions that were origionally submitted from that post. Of course, in chronological order.


My preference would be to take option one, since that would allow me to use comment luv etc.


Any suggestion on how to write this functionality myself or someone who would be willing to do it for me? Of course modest compensaton would be given.


Thanks! any responses can be mailed to rfair404 [at] gmail.com

Oliver - Admin

7:45 am - October 24, 2008

posts 3921

2

Let me get this right...

Option 1:  You're using the cforms WP comment form feature? Additional fields (due to WP's limitation) will not be recorded!

Ideally I would load two seperate cforms, side by side, one for those who agree, and one for those who do not.

That part I don't get, why two forms, I thought the radio button is in the comment form already. Also, do users need to submit a comment to rate?

Option 2 is easy. You can add a hidden field and default set it to {PostID}. This way you track the response in reference to the current post.

For appropriate data retrieval, you can use cforms API call: get_cforms_entries() and may even customize it, to include an additional parameter to only search on a particular post ID.

Then you only need to render the return results.

Of course modest compensaton would be given.

...creates modest code ;-)

Julio - Guest

2:06 pm - November 18, 2008

3

Oliver, have any way to associate a form with a user ID? Like u mentioned to associate with the PostID, I tried but with no success use {UserID}...

This form will be on a page that requires user login, so the user ID will be available (I think so)

thanks for the grat plugin and support!

Oliver - Admin

7:39 pm - November 18, 2008

posts 3921

4

{CurUserID} is of course only set when you're logged in. Make sure to enable:

Extra variables
e.g. {Title}

in your form.

Julio - Guest

10:20 pm - November 18, 2008

5

Like a charm! Works great, thanks!

Reply to Post


Reply to Topic: Displaying form Submissions in Posts etc
PLEASE READ THE FAQs FIRST! THANK YOU.

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Topic Reply:

Save New PostSmileysOptions

Guest URL (required)

Math Required!
What is the sum of:
2 + 6
   

 
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell

Search