gravityflow_entry_url_inbox_table

Description

The gravityflow_entry_url_inbox_table filter allows customization of the URL to which entries in the Inbox are sent. It is a complement to the gravityflow_entry_link_inbox_table that lets you customize the text and attributes of the link.

Parameters

ParameterTypeDetails
$url_entryStringThe entry URL.
$entryEntryThe current entry.
$argsArrayThe inbox page arguments.
$formFormThe form object for the current entry.

Examples

Route partial entries to the original form for completion

If you have the partial entries add-on for Gravity Forms, users can return to complete a form before submitting it. If the user-provided sufficient information to have an entry associated to them, these partial entries can be displayed in the inbox. You can use this filter to ensure their continuation routes to the original form/page where they started the submission from.

add_filter( 'gravityflow_entry_url_inbox_table', 'customize_entry_url', 10, 4 );
function customize_entry_url( $url_entry, $entry, $args, $form ) {
    if ( isset( $entry['resume_url'] ) &&  $entry['resume_url'] != '') {
        $url_entry = $entry['resume_url'];
    }
    return $url_entry;
}

The snippet would allow you to open the form submission link directly from Inbox instead of the usual approach of first opening the workflow details page and then clicking on the Open Form button.

add_filter( 'gravityflow_entry_url_inbox_table', 'customize_entry_url', 10, 4 );
function customize_entry_url( $url_entry, $entry, $args, $form ) {

	$api = new Gravity_Flow_API( $form['id'] );
	$step = $api->get_current_step( $entry );

	if ( $step && $step->get_type() == 'form_submission' ) {
		$url_entry = GFCommon::replace_variables( '{workflow_form_submission_url}', $form, $entry, false, true, true, 'html' );
	}

	return $url_entry;
}

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?