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.

Post User Generated Content to Page

  1. I'm trying to get GF to submit to a page rather than a post. I read this thread: http://www.gravityhelp.com/forums/topic/can-pages-be-created-from-form-submissions#post-1832 and have it sort of working.

    I used this code:

    add_filter("gform_post_data", "change_post_type", 10, 2);
    function change_post_type($post_data, $form){
        //only change post type on form id X
        if($form["id"] != 1) // You need to change your form ID here
           return $post_data;
    
    	   // Add other page data to change
    	   $post_data["post_type"] = "page";
    	   $post_data["post_parent"] = 42;
        return $post_data;
    }

    I'm trying to get it to post to a specific page - not create a new page. The form is located at: http://www.devusedtires.socialwebdzine.com/reviews. I want to post the reviews to the top of that page before the form. Is it possible to do that?

    Posted 11 years ago on Thursday November 15, 2012 | Permalink
  2. The topic you linked to (one of the very first questions I posted here) will CREATE a Page, not a Post: that was the only reason for the code.

    To update an existing page instead of create a new page, you will need to use the gform_after_submission hook to take the data that was submitted by your visitor, and update an existing post. http://www.gravityhelp.com/documentation/page/Gform_after_submission

    However, for the best search engine results, I would recommend creating a new review with every form submission (so, one post for each submission) and then have them all of one category (reviews?) or one custom post type, and then display them all on an archive page. You can handle it however you like, but I would go the route of individual posts for each review, then display them all however you like.

    Posted 11 years ago on Saturday November 17, 2012 | Permalink
  3. Hi,
    I want to know how I can set up gravity forms to display ALL the enteries after the form has been submitted.
    Basically I want the form to display ALL the submissions for that form in a existing page. The submissions are made every week so it would be added to the same page every week rather then create a new one, is there a way to do this?

    Posted 11 years ago on Friday January 25, 2013 | Permalink
  4. @rinths, your question is unrelated to the topic here. Please begin a new topic and share as much information as you can. Thank you.

    Posted 11 years ago on Tuesday January 29, 2013 | Permalink

This topic has been resolved and has been closed to new replies.