From b47bd1366694ee7fdb107440dd458563f42f4ca0 Mon Sep 17 00:00:00 2001 From: saifsultanc Date: Fri, 4 Apr 2025 11:09:08 +0530 Subject: [PATCH 1/2] `gpnf-attach-child-entry-by-field.php`: Fixed an issue with snippet not working on nested modal failed validation. --- gp-nested-forms/gpnf-attach-child-entry-by-field.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gp-nested-forms/gpnf-attach-child-entry-by-field.php b/gp-nested-forms/gpnf-attach-child-entry-by-field.php index 9e7108720..055ca42b7 100644 --- a/gp-nested-forms/gpnf-attach-child-entry-by-field.php +++ b/gp-nested-forms/gpnf-attach-child-entry-by-field.php @@ -52,7 +52,7 @@ public function attach_child_entry_to_parent( $child_entry ) { } public function hide_parent_entry_id_field( $form ) { - if ( ! $this->is_applicable_child_form( $form ) || rgar( $_REQUEST, 'action' ) !== 'gpnf_refresh_markup' ) { + if ( ! $this->is_applicable_child_form( $form ) || ( rgar( $_REQUEST, 'action' ) !== 'gpnf_refresh_markup' ) && ! rgpost( 'gform_submission_method' ) ) { return $form; } foreach ( $form['fields'] as &$field ) { From 503f11b643910ff1ecac8bed9fdf1adc0ffa248b Mon Sep 17 00:00:00 2001 From: Saif Sultan Date: Wed, 16 Apr 2025 15:53:27 +0530 Subject: [PATCH 2/2] `gpnf-attach-child-entry-by-field.php`: Fixed an issue with snippet not working on nested modal failed validation. --- gp-nested-forms/gpnf-attach-child-entry-by-field.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gp-nested-forms/gpnf-attach-child-entry-by-field.php b/gp-nested-forms/gpnf-attach-child-entry-by-field.php index 055ca42b7..a76545a08 100644 --- a/gp-nested-forms/gpnf-attach-child-entry-by-field.php +++ b/gp-nested-forms/gpnf-attach-child-entry-by-field.php @@ -52,7 +52,11 @@ public function attach_child_entry_to_parent( $child_entry ) { } public function hide_parent_entry_id_field( $form ) { - if ( ! $this->is_applicable_child_form( $form ) || ( rgar( $_REQUEST, 'action' ) !== 'gpnf_refresh_markup' ) && ! rgpost( 'gform_submission_method' ) ) { + if ( + ! $this->is_applicable_child_form( $form ) || + ( ! in_array( rgar( $_REQUEST, 'action' ), array( 'gpnf_refresh_markup', 'gpnf_edit_entry' ), true ) + && ! rgpost( 'gform_submission_method' ) ) + ) { return $form; } foreach ( $form['fields'] as &$field ) {