Home › Forums › General Issues › Using ACF Email Field for Gravity Forms Notifications › Reply To: Using ACF Email Field for Gravity Forms Notifications
For this filter:
add_filter( 'gform_notification_55', 'acf_email', 10, 3);
function acf_email ($notification, $form, $entry){
$post_id = rgar($entry, '14');
$notification['to'] = get_field('staff_email', $post_id);
return $notification;
}
Notification was misspelled in the returning line (‘notificaiton’). There is also a misspelling of it in two places on the second filter tried, but I think that one has other problems, as well.
Beyond making sure there is no typo in notification throughout any given filter used, I’d verify:
1) 55 is the correct form ID of the form you’re trying to modify this on
2) 14 is the correct ID of the field that the post ID you’re passing to this form is located inside of.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.