Skip to content

Commit 2e9d14c

Browse files
authored
gpnf-attach-child-entry-by-field.php: Fixed an issue with snippet not working on nested modal failed validation.
1 parent e4d9afb commit 2e9d14c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gp-nested-forms/gpnf-attach-child-entry-by-field.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ public function attach_child_entry_to_parent( $child_entry ) {
5252
}
5353

5454
public function hide_parent_entry_id_field( $form ) {
55-
if ( ! $this->is_applicable_child_form( $form ) || rgar( $_REQUEST, 'action' ) !== 'gpnf_refresh_markup' ) {
55+
if (
56+
! $this->is_applicable_child_form( $form ) ||
57+
( ! in_array( rgar( $_REQUEST, 'action' ), array( 'gpnf_refresh_markup', 'gpnf_edit_entry' ), true )
58+
&& ! rgpost( 'gform_submission_method' ) )
59+
) {
5660
return $form;
5761
}
5862
foreach ( $form['fields'] as &$field ) {

0 commit comments

Comments
 (0)