Created
May 25, 2015 17:42
-
-
Save ksnider/4b4bf61850425a2d7fce to your computer and use it in GitHub Desktop.
Gravity Forms Email Fields Notification Admin Hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter("gform_email_fields_notification_admin", 'add_field_to_email_list', 10, 2); | |
// This filter add/remove fields from the list of email fields that get displayed on the Notification edit page when configuring | |
// the "Send To Field". | |
add_filter("gform_email_fields_notification_admin", 'add_field_to_email_list', 10, 2); | |
function add_field_to_email_list($field_list, $form){ | |
//Adds field with ID=1 to the list of email fields | |
foreach($form["fields"] as $field){ | |
if($field["id"] == "1") | |
$field_list[] = $field; | |
} | |
return $field_list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment