gravityflow_inbox_submitter_name

The gravityflow_inbox_submitter_name filter can be used to override the value which appears in the Submitter column of the Workflow Inbox.

Parameters

$submitter_name   string

The display_name of the logged-in user who submitted the form or the guest ip address.

$entry   Entry Object

The entry object for the row currently being processed.

$form   Form Object

The form object for the current entry.

Examples

The following example shows how you can replace the submitter ip address with the value from a form field, such as a Name field.

add_filter( 'gravityflow_inbox_submitter_name', 'inbox_submitter_name', 10, 3 );
function inbox_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 should be placed in the functions.php file of your active theme.

Still need help? Contact Support Contact Support