Conditional Email based on field value for the first update

By: Jean Padgett | Asked: 09/01/2024
ForumsCategory: General questionsConditional Email based on field value for the first update
Jean Padgett asked 4 months ago
Hi, When sending an email after a form is updated is there a way to add conditional logic to only send the email the first time a field is updated?  My scenario is we have a field that we update based on an event.  When that field is updated I would like to get an email.  I have that setup now but any updates to the form after the initial update the email is sent.  I would like to receive the email only the first time the field is updated. Any thoughts? Regards  
1 Answers
Rob LeVineRob LeVine answered 4 months ago
There are different variations on the following, so this is just an idea as a starting point. Add a hidden field and default it to 0. Each time you update, increment the field value by 1. In your email notification, add a conditional that the hidden value equals 1. That way it'll fire only after it's been updated once.
Jean Padgett replied 4 months ago

This is an interesting way to handle something like this and I believe I can come up with a variation of this that will work for my situation. Thanks so much for the response

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right