Email signature shortcode for Gravity Forms notifications [RESOLVED]

Hey Gravity Forms users,

We have a somewhat complicated setup for purchasing memberships on our site (5 kinds, different options for renewing for each one) and we have something like 10 forms that add up to 80 different notifications that go out.

I would like to put a block of “help text” and a signature field in each of these notifications, but I don’t want to have to update the notification in each one should that information ever change. This will be a real pain if this static information has to change when you have this many notifications for different situations.

Here’s an example of the static text I’d like to put in the bottom of each email:

If you ever have any questions about your membership, please contact our member coordinator, Don Caballero, at memberships@xyz.com or phone (306) 777-7771.

Thank you again for joining xyz.com! We look forward to hearing from you!

—Don

Rather than inserting this text on every notification, I would love to accomplish this by coding my own Gravity Forms shortcode that either inserts a block of text from the code itself (which I can change programmatically), or perhaps draws from a value from an options field set up with Advanced Custom Fields or something, so my clients can change the email signature at will.

Then instead of this static signature text, I would just insert the shortcode into each notification and its content could be universally updated later, when needed.

Is there a guide that can get me started?

Thanks in advance

Rob

Hi Don. The gform_notification filter documentation has an example of how to append text to every message:

You would not need to add the shortcode to any messages: the text would be added to all notifications by default. You could disable it for some notifications by filtering the form ID or notification name in the code. The text could be updated in the code here (rather than in the code for a shortcode), so you have just one place to keep up to date and have it changed everywhere.

Will that work for you?

Yes, that’s amazing - thanks for pointing out that part of the documentation! I’m sure one could then use conditional logic in PHP to make different text appends, based on the form ID or something else.

I definitely didn’t want to place the text in the shortcode itself - very purpose-defeating. :).

Thanks so much for this help!

1 Like