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.

New record added - id to cookie

  1. Hi There,
    Let's say a user submits a form. I would like to get the record number for that entry so that I can put it in a cookie. Is there an easy way to do this?
    Thanks,
    Mark

    Posted 11 years ago on Friday March 15, 2013 | Permalink
  2. The entry ID is not assigned until after the entry is created. When did you want to set your cookie? As it stands, the entry ID would not be available until after the entry is created and the only hook available would be gform_after_submission.

    Posted 11 years ago on Sunday March 17, 2013 | Permalink
  3. I was thinking of creating the cookie after the entry was created. I will have a look at the documentation for gform_after_submission.
    Thanks,
    Mark

    Posted 11 years ago on Monday March 18, 2013 | Permalink
  4. Yes, if you want to create the cookie after the form is submitted, then gform_after_submission is the was to do it. You will have all the submitted form values there.

    Posted 11 years ago on Tuesday March 19, 2013 | Permalink
  5. That should do it. Thanks very much!

    Posted 11 years ago on Tuesday March 19, 2013 | Permalink
  6. Let us know how it turns out. Thanks for the update.

    Posted 11 years ago on Thursday March 21, 2013 | Permalink