-
-
Save naomicbush/43f46dd16f1dbb1491c2 to your computer and use it in GitHub Desktop.
<?php | |
function send_notification ( $event, $form, $lead ) { | |
$notifications = GFCommon::get_notifications_to_send( $event, $form, $lead ); | |
$notifications_to_send = array(); | |
//running through filters that disable form submission notifications | |
foreach ( $notifications as $notification ) { | |
if ( apply_filters( "gform_disable_notification_{$form['id']}", apply_filters( 'gform_disable_notification', false, $notification, $form, $lead ), $notification, $form, $lead ) ) { | |
//skip notifications if it has been disabled by a hook | |
continue; | |
} | |
$notifications_to_send[] = $notification['id']; | |
} | |
GFCommon::send_notifications( $notifications_to_send, $form, $lead, true, $event ); | |
} | |
?> |
Sorry I'm a really newbie but after weeks of searching this seems to be exactly what I'm looking for.
I would like to send a GF notification just after a new user click the link in the email and activate the account.
Where am I supposed to paste your code?
Thanks in advance
In WordPress, I would like the ability to check if a certain field from a Gravity Forms entry has been updated or not by the user after X days has passed since they first submitted the form. On my site, the user fills in the form slowly over a period of a few months. Each time they come back to the site, they would edit their entry (I'm using Gravity View plugin).
But, if that database cell does not have any content in it by X date, I would like an email to go out to the user who submitted the form asking them to update the form (in case they forgot to come back or just got lazy).
There are all sort of plugins that can send out emails, like Woocommerce's "Follow Up Emails", but what I need is to schedule an email and, conditionally... if the user has not already filled out a specific Gravity Forms field by X date, the email should sent. If the user has filled out the field by X date, the email SHOULD NOT be sent to the user.
Any ideas?
I have a similar question as @offordscott. I need to send an email notification when form is approved. Currently, I have a notification for form received. I have included a hidden check box field with Approved, Pending, Incomplete, Duplicate options. I would like to create a email notification to be triggered when the Approved box has been selected. Is this possible? with this type of code. Any information where I can learn to create this action would be very helpful. Also, @offordscott did you get any response?
To send a notification after a manual edit to the entry (ie selecting 'Approved' in a radio button) use the 'gform_after_update_entry' action hook. Your notification should be conditional to the radio button value is 'Approved' if you don't want it to be sent immediately. Then after an update to the entry you can trigger the send. If the condition is then met, it will send.
@wlarch
Did you ever solve this? Looking for exactly the same solution.