gravityflow_feedback_message_user_input

Description

Use the gravityflow_feedback_message_user_input filter to change the text of the feedback message on the user input step.

Parameters

ParameterTypeDetails
$parametersStringThe message to be displayed to the assignee when the detail page is redisplayed.
$new_statusStringThe new status.
$assigneeAssigneeThe assignee object.
$formFormThe current form array.
$stepStepThe current step

Examples

Change the message to for a specific step ID

add_filter( 'gravityflow_feedback_message_user_input', 'sh_gravityflow_feedback_message_user_input', 10, 5 ); 
function sh_gravityflow_feedback_message_user_input( $feedback, $new_status, $assignee, $form, $step ) { 	
     if( $step->get_id() == '42' ) {
            return 'Thank you for your input to the delivery cycle program.';
        }
        return $feedback;	
return ""; 
}

Redirect the user to a different page upon successful completion of the step.

add_filter( 'gravityflow_feedback_message_user_input', 'sh_gravityflow_feedback_message_user_input', 10, 5 ); 
function sh_gravityflow_feedback_message_user_input( $feedback, $new_status, $assignee, $form, $step ) {
	if ($form['id'] == '500')
	{$feedback = '<script>window.location = "http://www.google.com";</script>';}
	return $feedback;
}

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?