gpnf_post_duplicate_entry

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Open Edit modal after child entry is duplicated.
  5. Since

Description

Do something after a child entry has been duplicated on the frontend.

Usage

gform.addAction( 'gpnf_post_duplicate_entry', 'my_custom_function' );

Parameters

  • entry object

    The properties of the child entry including field values.

  • response object

    The full response from the duplication AJAX request.

Examples

Open Edit modal after child entry is duplicated.

/**
 * Gravity Perks // Nested Forms // Open Edit Modal After Child Entry Is Duplicated
 * https://gravitywiz.com/documentation/gravity-forms-nested-forms/
 *
 * Instructions:
 *
 * 1. Install this snippet with our free Custom JavaScript plugin.
 *    https://gravitywiz.com/gravity-forms-code-chest/
 */
gform.addAction( 'gpnf_post_duplicate_entry', function( entry, data, response ) {
	$( 'tr[data-entryId="{0}"]'.gformFormat( entry.id ) ).find( '.edit a' ).click();
} );

Since

This filter is available since Gravity Forms Nested Forms 1.0-beta-8.70.