ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Showing Entry ID field in the publish page

August 22, 2012 3:17am

Subscribe [1]
  • #1 / Aug 22, 2012 3:17am

    I was wondering if there was a way to show the entry_id field in the publish page. I’ve tried to customize it in every possible way but there seems to be no way of showing and entry’s id on that page - I want to use this as unique product identifies as well (every product has an unique entry so why not use the entry ID as an product ID).

    If this is not possible, is there a way to dynamically change the parsing order of safecracker to allow this code to work

    {exp:safecracker channel="the_channel"}
                                   <input type="hidden" name="custom_field_1" value="{entry_id}"  /><label for="custom_field_1">
                                   <input type="hidden" name="custom_field_1" value="ENTRY_ID"  /><label for="custom_field_1">
                                  
                                      <input type="submit" class="medium radius button dark-blue" value="Submit »" id="submit_button">
                                  
    {/exp:safecracker}

    I’ve tried both instances and the entry ID upon checking the backend comes up not as the entry’s unique id but as “{entry_id}” or “ENTRY_ID”

    Thanks!

  • #2 / Aug 22, 2012 5:13pm

    Dan Decker

    7338 posts

    Hi chiwayentertainment,

    The issue here is ExpressionEngine has no way of knowing a new entry’s ID before it is created, and it isn’t created until you submit the SafeCracker and the chicken came before the egg, or did it?

    Now, if you are editing an existing entry, the field’s value can be set with {entry_id}. There’s just no reliable way to know what entry_id is going to be until after the entry is in the channel.

    Is there anything else I can assist you with?

    Cheers,

  • #3 / Aug 22, 2012 5:46pm

    Hi there,

    What I am trying to do is very basic - I’d like to see an entry_id field on the publish page, its that simple - that is why I tried to pass on the entry_id into a custom field after safecracker publishing.

    We want to use entry_ids as unique product identifiers exactly as they are so appending letters or numbers to the actual entry_id number is not an option.

    Is there a non invasive way of showing the ID number on the publish page?

    Many thanks!

  • #4 / Aug 23, 2012 1:55pm

    Dan Decker

    7338 posts

    I followed up in another thread with a response for you.

    Check my response and please reply back here. Cross-posting can get confusing and I want to be sure I stay focused on helping you directly!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases