Skip to content

Commit 8eba912

Browse files
authored
gpnf-always-include-child-entries-from-session.php: Fixed issue where child entries would show up multiple times on multi-page forms.
1 parent 15e45f9 commit 8eba912

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gp-nested-forms/gpnf-always-include-child-entries-from-session.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
$entry_ids = array_merge( $entry_ids, $_entries[ $field->id ] );
1616
}
1717

18-
return $entry_ids;
18+
// When traversing multi-page forms, entry IDs will be duplicated from the session and the posted entry ID values.
19+
// Ensure each unique entry ID is only included once.
20+
return array_unique( $entry_ids );
1921
}, 10, 3 );

0 commit comments

Comments
 (0)