Skip to content

Commit bee28e2

Browse files
authored
gw-all-fields-template.php: Added support to handle meta modifier to display meta keys values.
1 parent 12d5686 commit bee28e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,17 @@ public function parse_template( $template, $modifiers, $form, $entry, $options =
331331
$items = $this->get_items( $form, $entry, $display_empty, ! $use_value, $options['format'], $use_admin_label, 'all_fields', $_modifiers );
332332
}
333333

334+
// Add meta fields to the items array.
335+
if ( ! empty( $modifiers ) && array_key_exists( 'meta', $modifiers ) ) {
336+
$meta_keys = $modifiers['meta'];
337+
foreach ( $meta_keys as $key ) {
338+
$items[] = array(
339+
'label' => $key,
340+
'value' => gform_get_meta( $entry['id'], $key ),
341+
);
342+
}
343+
}
344+
334345
$output = $this->load_template( $template, null, array(
335346
'form' => $form,
336347
'entry' => $entry,

0 commit comments

Comments
 (0)