Description
The gravityflow_status_submitter_name filter can be used to override the value that appears in the Submitter column of the Workflow Status page.
Parameters
Parameter | Type | Details |
---|---|---|
$submitter_name | String | The display_name of the logged-in user who submitted the form or the guest ip address. |
$entry | Entry | The entry object for the row currently being processed. |
$form | Form | The form object for the current entry. |
Examples
Replace the submitter IP address with the value from a form field
add_filter( 'gravityflow_status_submitter_name', 'status_submitter_name', 10, 3 );
function status_submitter_name( $submitter_name, $entry, $form ) {
if ( ! is_numeric( $entry['created_by'] ) ) {
if ( $form['id'] == 2 ) {
$submitter_name = rgar( $entry, '1.3' ) . ' ' . rgar( $entry, '1.6' );
}
}
return $submitter_name;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?