Skip to content

Commit 35cdede

Browse files
committed
gw-advanced-merge-tags.php: Added support for {all_fields} modifier to show data for all entries.
1 parent 3e6b6fe commit 35cdede

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

gravity-forms/gw-advanced-merge-tags.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -506,25 +506,6 @@ public function handle_field_modifiers( $value, $input_id, $modifier, $field, $r
506506
return rgar( $value_array, $index );
507507
}
508508
break;
509-
case 'all_fields':
510-
// {all_fields} merge tag support needs to get the entry IDs from the raw value.
511-
$entries = json_decode( $raw_value, true );
512-
513-
// loop through each entry ID and get the {all_fields} output.
514-
$output = '';
515-
foreach ( $entries as $entry_id ) {
516-
$entry = GFAPI::get_entry( $entry_id );
517-
$form = GFAPI::get_form( $entry['form_id'] );
518-
519-
// Get the {all_fields} output for each entry.
520-
$all_fields_output = GFCommon::replace_variables( '{all_fields}', $form, $entry, false, false, false );
521-
522-
$output .= $all_fields_output;
523-
}
524-
525-
// if no entries were found, return the original value.
526-
$value = $output ? $output : $value;
527-
break;
528509
case 'all_fields':
529510
// Only to be applied for GPPA scenarios, where we may using dynamically populated entry ID data.
530511
if ( ! is_callable( 'gp_populate_anything' ) || ! gp_populate_anything()->is_field_dynamically_populated( $field ) ) {

0 commit comments

Comments
 (0)