Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello -
Looking for a way to send an email that contains the fields that were changed when a particular piece of content is saved.
What tokens or code should be placed in the body of the email?
Thank you,
Joe
Comments
Comment #2
TR CreditAttribution: TR commentedDrupal only knows that the content was updated - it doesn't keep track of what exactly changed, if anything (e.g. you could save the content without changing any values). You will have to decide for yourself what should be included in your email. The easiest way might be to do this in the theme layer, with a template for your email which only prints non-empty variables holding the field values, and a preprocess function that compares before/after field values and sets the variables accordingly.