Skip to content

Instantly share code, notes, and snippets.

@bhubbard
Last active December 27, 2015 17:39
Show Gist options
  • Save bhubbard/7363598 to your computer and use it in GitHub Desktop.
Save bhubbard/7363598 to your computer and use it in GitHub Desktop.
add_action("gform_after_submission", "set_post_content", 10, 2);
function set_post_content($entry, $form){
//Gravity Forms has validated the data
//Our Custom Form Submitted via PHP will go here
// Lets get the IDs of the relevant fields and prepare an email message
$message = print_r($entry, true);
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('EMAIL ADDRESS', 'Getting the Gravity Form Field IDs', $message);
}
@ibuilder
Copy link

gform_post_submission is depricated .. use gform_after_submission: http://www.gravityhelp.com/documentation/page/Gform_after_submission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment