Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ksnider/4b4bf61850425a2d7fce to your computer and use it in GitHub Desktop.
Save ksnider/4b4bf61850425a2d7fce to your computer and use it in GitHub Desktop.
Gravity Forms Email Fields Notification Admin Hook
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