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.

Using forms to update a post

  1. I recently read this: http://www.doitwithwp.com/pre-populate-fields-using-gravity-forms/

    I'm just putting together a directory site of churches. I'd like for visitors to be able to submit a form to update a listing. Could this be done with gravity forms? Ideally, changes would need to be approved before taking effect. From the article referenced above, it seems like this may be possible.

    Thanks!
    Jack

    Posted 11 years ago on Wednesday May 30, 2012 | Permalink
  2. Thinking out loud...

    You could pre-populate the form with information from a prior submission. That would display the current data. At this point you would know the post ID as well. When the form is submitted, you could use the gform_after_submission to call the WordPress function wp_update_post.

    http://www.gravityhelp.com/documentation/page/Gform_after_submission
    http://codex.wordpress.org/Function_Reference/wp_update_post

    The gform_after_submission post actually shows the use of wp_update_post.

    It's possible to do with a bit of thought and some code using the hooks and filters which are built in to WordPress.

    Posted 11 years ago on Monday June 11, 2012 | Permalink