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

jcaprio_nwe created an issue. See original summary.

TR’s picture

Status: Active » Closed (works as designed)

Drupal 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.