gpeb_entries_table_summary_columns

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Add an additional field to the summary columns
  5. Since

Description

Filter the summary columns to be displayed in the entries table.

Usage

Filter the summary columns to be displayed in all Entries Table blocks.

add_filter( 'gpeb_entries_table_summary_columns', 'my_custom_function' );

Filter the summary columns to be displayed in Entries Table blocks querying a specific form.

add_filter( 'gpeb_entries_table_summary_columns_FORMID', 'my_custom_function' );

Parameters

  • summary_columns array

    The summary columns to be displayed.

  • form array

    The form being queried.

  • block array

    The block being rendered.

Examples

Add an additional field to the summary columns

add_filter( 'gpeb_entries_table_summary_columns', function( $summary_columns, $form, $block ) {
	$summary_columns[] = array(
		'type' => 'field',
		'meta' => array(
			'fieldId' => '1',
		),
	);
	
	return $summary_columns;
}, 10, 3 );

add_filter( 'gpeb_entries_table_summary_columns', function( $summary_columns, $form, $block ) {
	foreach ( $summary_columns as &$column ) {
		if ($column['type'] != 'edit-link') {
			continue;
		}

		if ( !is_array( $column['meta'] ) ) {
			$column['meta'] = array();
		}

		// You can customize both or just one of these
		$column['meta']['label'] = 'Custom Column Label';
		$column['meta']['linkLabel'] = 'Custom Link Label';
	}
	return $summary_columns;
}, 10, 3 );

Since

This filter is available since Gravity Forms Entry Blocks 1.0-beta-1.3.