Gravity Wiz // Gravity Forms // Populate column on entry list dynamically via Entry Meta
/*
* Gravity Wiz // Gravity Forms // Populate column on entry list dynamically via Entry Meta
*/
add_filter( 'gform_entry_meta', function( $entry_meta ) {
$entry_meta['user_first_name'] = array(
'label' => 'Name',
'is_numeric' => false,
'is_default_column' => true
);
return $entry_meta;
} );
add_filter( 'gform_entries_field_value', function( $value, $form_id, $field_id, $entry ) {
if( $field_id == 'user_first_name' ) {
$user_id = rgar( $entry, 'created_by' );
$value = get_user_meta( $user_id, 'first_name', true );
}
return $value;
}, 10, 4 );