I have attempted to utilize a WP custom field to hold the form recipient email address and when I add the suggested code above to the functions.php file I have an immediate problem.
As soon as I "update file", the code appears in the functions.php file in the editor but also appears in the dashboard at the top of the window.When I refresh my page, the code remains on the screen while the rest of the screen is white. NOt sure what is causing this but if I backpage to the editor and remove the code and update file again, then everything reverts to normal. So In other words, it's not working for me.
I had altered the code to reflect my specific situation...
//GravityForms to use custom field for email delivery address
add_filter("gform_notification_email_1", "route_notification", 10, 2);
function route_notification($email_to, $entry){
global $post;
$company_email = get_post_meta($post->ID, "email", true);
return $email_to . ',' . $company_email;
}
Whereby my form ID was "1" and the custom field name was "email".
I can't provide a link to the form since this site is live and I can't really "break" my site just so that I can provide a link to the form.
Wondering what is wrong?
Posted 14 years ago on Tuesday June 1, 2010 |
Permalink