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.

Merg Tag Notification

  1. jcrea
    Member

    I'm using a custom function in my theme to generate a incremental number in the post meta table for each post (custom post type) that gets created ( kind of like the post id ) but it's a custom field.
    I'm looking for a way to pull that field into the notification email the same way the post id can be done.
    Keep in mind, the field is hidden, it's not viable in the admin editor while adding/editing a post and is not populated until the post is published ( like the post id).
    Any help would be greatly appreciated.
    Thanks.

    Posted 11 years ago on Thursday October 18, 2012 | Permalink
  2. jcrea
    Member

    TYPO (viable) should visible. :)

    Posted 11 years ago on Friday October 19, 2012 | Permalink
  3. jcrea
    Member

    This is my custom function:

    function create_ticketid($post_ID) {
       global $wpdb;
       $latestid=$wpdb->get_var("SELECT meta_value from $wpdb->postmeta where meta_key='ticket_id' order by meta_value DESC limit 1;");
       if(!wp_is_post_revision($post_ID)) {
    add_post_meta( $post_ID, 'ticket_id', $latestid+1, true );
      }
    }
    add_action( 'publish_my_postttype', 'create_ticketid');

    I've tried looking at gform_after_submission and gform_pre_submission_filter but can't seem to get anything to work.
    Please help.
    Thanks.

    Posted 11 years ago on Saturday October 20, 2012 | Permalink
  4. jcrea
    Member

    Can't anyone give me a clue?

    Posted 11 years ago on Tuesday October 23, 2012 | Permalink
  5. jcrea
    Member

    It's been over a month and not one response?

    Posted 11 years ago on Wednesday November 21, 2012 | Permalink