gravityflow_workflow_detail_display_field

Use this filter to hide specific fields on the workflow detail page.

The follow example will hide a specific field when on a specific step.

// Hide field ID 4 when on step ID 88
add_filter( 'gravityflow_workflow_detail_display_field', 'sh_gravityflow_workflow_detail_display_field', 10, 5 );
function sh_gravityflow_workflow_detail_display_field( $display, $field, $form, $entry, $current_step ) {
    if ( $current_step && $current_step->get_id() == 88 && $field->id == 4 ) {
        $display = false;
    }
    return $display;
}

The follow example will hide all fields on Form 1 except fields 4, 5 and 6.

// Hide all fields except fields 4 on Form 1
add_filter( 'gravityflow_workflow_detail_display_field', 'sh_gravityflow_workflow_detail_display_field', 10, 5 );
function sh_gravityflow_workflow_detail_display_field( $display, $field, $form, $entry, $current_step ) {
	if ( $form['id'] == 1 ) {
		if ( in_array( $field->id, array( 4, 5, 6 ) ) ) {
		$display = true;
		} else {
			$display = false;
		}
	}
	return $display;
}

Placement

This code should be placed in the functions.php file of your active theme.

Still need help? Contact Support Contact Support