PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Trying to replicate cforms functionality

  1. Hi,
    I just bought Gravity Forms yesterday in hopes that I can replicate some functionality that cforms has but without some of the hassles.

    I used cforms to build a candidate questionnaire and built a simple query for voters to use to review the candidates' responses on another page. You can see how the simple query works here:http://www.boulderblueline.org/test-query/. It passes the users selection to a page with php code in the template that pulls up the responses they want to see. Give it a try to see what I'm trying to do.

    I use functions like "get_cforms_data" to pull responses from the database cforms created. It all works great, in theory. However, the actual questionnaire is too long for one page so I need to split it into mulitple pages and that's where cforms has lots of problems. Can't get the multipage thing to work for me at all there.

    So, I bought Gravity Forms and really like the form building stuff, and the page breaks are beautifully easy, but I can't find how to pull data out of the database of responses the way I was able to it in cforms. It was pretty easy and well-documented in cforms but I can't seem to find anything similar here. Is there documentation about how to retrieve the data?

    Thanks!

    Posted 12 years ago on Monday September 5, 2011 | Permalink
  2. Currently Gravity Forms does not have built in functions for displaying entry data on the front end. You would have to do this either by querying and displaying the entry data or by using a 3rd party add-on such as:

    http://wordpress.org/extend/plugins/gravity-forms-addons/

    Displaying entry data on the front end is a feature we plan on focusing on in the 1.7 release of Gravity Forms.

    Posted 12 years ago on Tuesday September 6, 2011 | Permalink
  3. Thank you. This is kinda funny because I posted almost the identical question to them and they sent me back to you! I'm really hoping I can get at the data somehow -- otherwise I'm screwed.

    Posted 12 years ago on Tuesday September 6, 2011 | Permalink
  4. The Gravity-forms-addons guy insists that Gravity Forms will allow me to do what I need to do. I'm not sure what you mean by "front end." I'm looking to post-process the data. Can you point me to the documentation/code/support thread or whatever that would help me find the functions that I need to get the data after it has been submitted? Here is what I was doing in cforms:

    <?php function general_topic($candidate, $responses) {
    					echo '<table rules="rows">';
    					echo '<tr><td width=30%></td><td width=70%></td></tr>';
    					foreach( $responses as $e ){
    
    						if ( $e['data']['Your Name'] == $candidate ) {
    							echo '<tr><td>Why do you want to serve on City Council?</td><td>' . $e['data']['Why do you want to serve on City Council?'] . '</td><tr>';
    							echo '<tr><td>What is the highest priority issue in Boulder right now?</td><td>' . $e['data']['What is the highest priority issue in Boulder right now?'] . '</td><tr>';
    							if ($e['data']['Will you be adbiding by campaign finance limits?'] == 'on') {
    								echo '<tr><td>Will you be abiding by campaign finance limits?</td><td>' . 'Yes' . '</td><tr>';}
    							else { echo '<tr><td>Will you be abiding by campaign finance limits?</td><td>' . 'No' . '</td><tr>';
    							}
    						}
    					}
    					echo '</table>';
    				}
    			?>

    Is there something equivalent to the function get_cforms_data(form_name)?

    Posted 12 years ago on Wednesday September 7, 2011 | Permalink
  5. I'm going to repost my question in a different way to see if that's helpful.

    Tomorrow, my organization is going to ask the city council candidates to fill out our questionnaire, a form I built with Gravity Forms. They will have 10 days to fill it out.

    On the 18th, we will make the candidates' responses available to the voters. I am trying to set up a system where the voters can choose a candidate's name and a topic and get the responses just for that candidate and topic, instead of a flood of responses from all candidates on all topics.

    Before, with cforms, I was able to do this by passing the selected candidate and topic to a page template that executed some php script that retrieved the array of responses (get_cforms_data(form_name)) and pulled out just the responses the user wanted to see. It worked great.

    So now, I'm trying to find the function that would get the array of responses from a Gravity Forms form. I also need the array structure, of course.

    Does that make sense? I think there must be a function or something that will get the array of responses from where ever they are stored. It is not a very tricky thing that I'm trying to do. Thanks.

    Posted 12 years ago on Wednesday September 7, 2011 | Permalink
  6. If the responses are public, can you create a post at the very beginning with each candidate's submission? Then all the work is done up front and you don't need to do any additional querying at all.

    It sounds like there will be a page named for each candidate, and that candidate's responses will be on display there? Or are you trying to do more than that?

    Posted 12 years ago on Wednesday September 7, 2011 | Permalink