GravityExport field: NotesField
There is no notes field. But we do (sometimes) have notes associated with the entry. The NotesField ย adds these notes to the output by merging all notes into one cell.
Filters #
gfexcel_notes_value_{form_id}This filter can change the content of the notes cell. To make things easier the filter actually gets 2 arguments; the current value and all the notes.
Example #
/**
* Filters the value of the "Notes" field during a GravityExport export.
*
* This hook allows you to customize the exported value of entry notes.
* You can use the `$notes` array to modify or format how notes are displayed
* in the exported file.
*
* @since 1.0.0
*
* @param string $value The current field value for the Notes field.
* @param array $notes An array of all notes associated with the entry.
*
* @return string The modified field value to be exported.
*/
add_filter(
'gfexcel_notes_value',
function ( $value, array $notes ) {
// $value is the current value for the Notes field.
// $notes is an array of all notes for the current entry.
// You can modify the output here using the notes data.
return $value;
},
10,
2
);