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.

Get created post id (post_id) reliably

  1. (Sorry this is now posted in the correct area)

    I'm using GFs to allow users to create post content on my website.

    I am trying to use the gform_post_submission hook to process the post data, and I'm trying to work out what the post id is of the newly created draft post.

    I have dumped out $GLOBALS and I can see the post id in PHPMailer object as the {post_id} value. Surely there is a better way to get the newly created post id?

    I can't believe this question has not been asked before.

    Thanks.

    Posted 14 years ago on Tuesday June 29, 2010 | Permalink
  2. The post_id is an element of the $entry array during post processing. $entry['post_id']

    Posted 14 years ago on Thursday July 1, 2010 | Permalink
  3. Thanks for this Transom.

    Posted 14 years ago on Saturday July 3, 2010 | Permalink

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