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.

Add lead id to notification email

  1. stvwlf
    Member

    Hi

    I need to return a unique ID on notification emails on submissions from one form. Lead ID seems workable for that. ( I realize when multiple forms are in use there will be gaps in the sequence #;s returned - that is acceptable ). One reason lead is good is its already associated with that submission's database record.

    How would I get Lead ID to appear on notification emails?
    Or, do you have a better suggestion on getting a sequence number on notification emails?

    thank you

    Posted 12 years ago on Monday January 9, 2012 | Permalink
  2. centilin
    Blocked

    Hi,

    I had a similar request a couple of days ago, and there are generally 2 options depending on what you want:
    - Sequential, use the entry ID for that. Entry ID is unique across the entire installation (you won't find entry no.2 for form 1 and form 2). I've opt to use that and the variable shortcode you should use is {entry_id} I believe.
    - Unique, generate a random ID. I've simplified an old function (that exists somewhere in the forum)

    function uuid() {
      $char = md5(uniqid(rand(), true));
      $uuid = substr($char, 0, 5);
      return $uuid;
    }

    This returns a 5 digit unique ID (made up of letters and characters), but there are chances of collision though.

    Angela

    Posted 12 years ago on Tuesday January 10, 2012 | Permalink
  3. stvwlf
    Member

    Hi Angela

    That works, thank you. Entry ID on the front end seems to be the same as Lead ID from the database. It was what I was looking for, sequential. I didn't realize it was already built into the notification interface. That makes it so easy.

    Steve

    Posted 12 years ago on Tuesday January 10, 2012 | Permalink

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