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.

I want a form to "edit" a custom post type...

  1. The form needs to be dynamic in that it will display a current posts title, content and 2 files (main file, sample file)..

    So say they have listed a post with title

    Title: "Car 1"
    Description: "This car is blue, it has 4 doors and has done 30,000 miles"

    Image 1: file.jpg
    Image 2: file2.jpg

    I want a page where the member can edit the Title, Description and change the images - I want to do this through the use of a Gravity form because:-

    1.) I do not want to create a new post
    2.) I want the original post to still be "published" while the changes are moderated....
    3.) I can then change the original post (manually) if I am happy that the changes requested by the member do not violate the terms of service of the website etc...

    Does this make sense?

    I am thinking of a form with pre-populated boxes, that are submitted and held in a different form "entries", which I can then copy over and replace the original post details..

    Hopefully this is possible??

    Posted 12 years ago on Sunday February 19, 2012 | Permalink
  2. Gaslight
    Member

    to enable custom post types with gravity forms there's this additional plugin:

    http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/

    but I'm not sure whether you can use gravity forms to edit an existing content

    Posted 12 years ago on Sunday February 19, 2012 | Permalink
  3. I'm using that plugin already, I'm just thinking effectively will be another form that is pre-populated with items from a MySQL database.

    Posted 12 years ago on Sunday February 19, 2012 | Permalink
  4. Gaslight
    Member

    try following this thread maybe?
    http://http://www.gravityhelp.com/forums/topic/a-basic-example-of-gform_post_submission-would-be-awesome

    Posted 12 years ago on Tuesday February 21, 2012 | Permalink
  5. Gravity Forms can be used to edit existing post content but it isn't built in functionality. You'd have to write custom code to accomplish it.

    - You'd have to write custom code to dynamically populate the form fields with the values you need to edit.

    - You'd have to write custom code to then update that Post instead of create a new Post when the form is submitted.

    One thing to note, based on what you describe, there is no concept of being able to update a draft for a post while the post is still Published. When a post is updated when it is Published, then the updates go live immediately. They aren't moderated. If you wanted to moderate the changes you would need to change the post status back to a Draft as part of the custom code implemented to update the Post content.

    This is a customization, there are no step by step examples to do this that I can point you to.

    Have people done it? Certainly. But they had to know how more than just Gravity Forms to accomplish it, they also had to have a complete understanding of how posts and pages are created and stored in WordPress and have a firm grasp of both hook/filter usage and PHP.

    From a form processing standpoint, ANYTHING is possible with Gravity Forms. The hooks and filters that are in place make any kind of customization that you'd like to happen after the form is submitted possible. However, you have to be able to write the custom PHP to make it possible.

    Gravity Forms only provides the hooks and filters necessary to allow you to attach your own custom code to key points in the form processing life cycle. We explain in the documentation when each hook is triggered and what each hook does. What you do with those hooks and filters is entirely up to you and/or your developer.

    Posted 12 years ago on Tuesday February 21, 2012 | Permalink