Skip to content

Instantly share code, notes, and snippets.

@mikeselander
Created February 28, 2014 03:52
Show Gist options
  • Save mikeselander/9264892 to your computer and use it in GitHub Desktop.
Save mikeselander/9264892 to your computer and use it in GitHub Desktop.
Get data out of a Gravity Form with gform_after_submission
/**
* Get an auction id & info from Gravity Forms ID8
*
* @since 0.1.0
*
*/
add_action('gform_after_submission_8', 'ps_add_bid_card_from_form', 10, 2); // _8 means we're only grabbing data when the form ID8 is submitted
function ps_add_bid_card_from_form($entry, $form) {
// Get these two fields from fields ID2 & ID3
$auction_id = $entry['3'];
$info = $entry['2'];
// Insert our resulting info into the custom table
bid_cards_insert_log( $auction_id, $info );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment