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.

Highlighting Entries

  1. twescott
    Member

    This will likely require custom coding, but I don't think it'd be extensive.

    I'd like for entries on my entries page to be highlighted - just one color - if certain conditions are true. For instance, if a note is added to an entry, I'd like for that entry to be highlighted in Yellow so that someone browsing the entries list would know that a comment has been made in that entry.

    It doesn't have to be yellow, and it doesn't have to be a highlight. Just something graphical to show that an entry has received a comment.

    Thanks for your help.

    Posted 11 years ago on Tuesday January 22, 2013 | Permalink
  2. You could do this. You would somehow have to get an array of the IDs of the entries which are going to be displayed on the entry list, then have to JOIN that information with the wp_rg_lead_notes table to see if any of those leads have notes, then if they do, you would need to add a CSS class to the < tr > tag (the table rows use <tr id="lead_row_1269" so the ID is present already and makes it easy to target.) You could add a class of "has-note" then add some admin CSS using

    add_action( 'admin_enqueue_scripts', 'load_gravity_note_highlight' );

    Where "load_gravity_note_highlight" is a function that loads the stylesheet which will have the styles for your new "has-note" class.

    It's more complicated than I expected, but mostly because the notes and leads and lead meta are all kept in separate tables, which will require some SQL to pull the information.

    One completely alternate possibility would be to star the entry or use one of the other wp_lead properties, whenever a note was added. I could not find a hook to change that lead property automatically when adding a note to an entry. I found the gform_after_update_entry hook, but that would run any time you edited and saved an entry, which might not be desirable.

    Posted 11 years ago on Tuesday January 29, 2013 | Permalink