Skip to content

Commit 0433099

Browse files
authored
gw-all-fields-template.php: Fixed a fatal error with the snippet and Nested Forms.
1 parent 6bf88fd commit 0433099

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gravity-forms/gw-all-fields-template.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ public function all_fields_extra_options( $value, $merge_tag, $modifiers, $field
177177
*/
178178
if ( $context == 'nested' ) {
179179

180+
$input_ids = array();
180181
$nested_form_field_id = rgar( $modifiers, 'parent', false );
181182
if ( ! $nested_form_field_id ) {
182183
break;
@@ -200,7 +201,7 @@ public function all_fields_extra_options( $value, $merge_tag, $modifiers, $field
200201
case 'filter':
201202
if ( in_array( $field->id, $field_ids ) ) {
202203
// Check for input-specific filters.
203-
if ( is_array( $raw_value ) && ! in_array( $field->id, $input_ids ) ) {
204+
if ( is_array( $raw_value ) && ! empty( $input_ids ) && ! in_array( $field->id, $input_ids ) ) {
204205
$filtered_values = array();
205206

206207
foreach ( $input_ids as $input_id ) {

0 commit comments

Comments
 (0)