bookmark_bordergform_entry_created

Description

This hook fires after the lead has been created but before the post has been created, notifications have been sent and the confirmation has been processed.

Usage

add_action( 'gform_entry_created', 'generate_mergedoc', 10, 2 );

Parameters

  • $entry Entry Object

    The entry that was just created.

  • $form

    The current form.

Examples

This example demonstrates how to use to gform_entry_created hook to populate a value in the entry’s *entry meta*. It is possible to populate the entry meta anywhere you have the entry ID; however, let’s assume that we’re going to retrieve this entry meta and replace a gform_custom_merge_tags.

add_action( 'gform_entry_created', 'generate_mergedoc' );
function generate_mergedoc( $entry, $form ) {

    $feed = self::get_mergedoc_feeds( $form['id'] );

    if ( empty( $feed ) || ! rgar( $feed, 'active' ) || ! $entry )
        return;

    // get download link
    $download_link = self::get_download_link( $uid );

    // update entry meta
    gform_update_meta( $entry['id'], 'gfmergedoc_download_link', $download_link );

}

Source Code

This filter is located in GFFormDisplay::handle_submission() in form_display.php