Greetings. I want to fire off a notification that triggers when I populate a hidden date field in the back end (admin). I’m trying to balance the following limitations as I develop a snippet.
Form ID is #14
Date field is #68
Flag field is #70
-
My newbie GF code development skills
-
Dates can’t be used at notification conditions so I am thinking a pre-submission code snippet that would sense the change from the date field being empty to being populated and set another text field to “1” as a flag … and I could use that text field to test for a conditional notification.
-
I’m not sure how to eliminate re-firing if I make another change to the entry sometime in the future. It seems that if the notification fires based on conditional logic checking for a flag, it will always trigger when the entry is updated because the flag is set. Maybe a post notification snippet is also needed to change the flag to “sent” so it will no longer trigger notifications … and make the pre-submission flag snippet only set the flag if the date changes and the flag field is not “sent”.
Note: GFAPI::send_notifications() seems to send all notifications - I only want to send one notification so I don’t think that can be used in a snippet.
Your help is appreciated … Thanks!