Open Edit Modal After Child Entry Is Duplicated

Instructions

  1. Install this snippet with our free Custom JavaScript plugin. https://gravitywiz.com/gravity-forms-code-chest/

Code

Filename: gpnf-open-edit-modal-after-child-entry-is-duplicated.js

/**
 * 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();
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.