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.

entry_id value needed

  1. I want to get the value of the entry id and have placed the following code into my functions.php:

    // adds id when you submit form
    add_action("gform_pre_submission", "populate_id");
    function populate_id( $form ) {
    $_POST['input_131'] = RGFormsModel::get_lead($entry_id);
    }

    where "131" is my field number for the placement.

    The reason i need to re populate the ID is b/c client doesnt want the tile of the form at the top. just the id. i can hide the entire "details" column, but now i need to re populate.

    thanks!

    Posted 12 years ago on Thursday February 9, 2012 | Permalink
  2. The gform_pre_submission hook fires BEFORE the entry exists. So it can't get the entry id, it doesn't exist at that point.

    You would have to use the gform_after_submission hook which fired AFTER the entry has been created.

    The gform_after_submission hook is documented here:

    http://www.gravityhelp.com/documentation/page/Gform_after_submission

    Posted 12 years ago on Thursday February 9, 2012 | Permalink

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