gpnf_replace_parent_merge_tag_on_edit (JS)

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Re-populate parent merge tags when editing entries replacing any previously saved value.
  5. Since

Description

Filter whether GPNF should re-populate any parent merge tags when editing an entry.

Return “true” to enable this behavior.

Usage

gform.addFilter( 'gpnf_replace_parent_merge_tag_on_edit', 'my_custom_function' );

Parameters

  • replace_parent_merge_tag boolean

    Whether or not to re-apply parent merge tags. Default: false

  • formId int

    The parent form ID.

Examples

Re-populate parent merge tags when editing entries replacing any previously saved value.

/**
 * Gravity Perks // Nested Forms // Repopulate Parent Merge Tags When Editing Entries
 * https://gravitywiz.com/documentation/gravity-forms-nested-forms/
 *
 * Use this snippet to repopulate {Parent} merge tag when editing entries, replacing any previously saved values.
 *
 * Instructions:
 *
 * 1. Install this snippet with our free Custom JavaScript plugin.
 *    https://gravitywiz.com/gravity-forms-code-chest/
 */
window.gform.addFilter( 'gpnf_replace_parent_merge_tag_on_edit', function () {
	 return true;
} );

Since

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