gravityflow_page_load_logic_setting

The gravityflow_page_load_logic_setting filter enables the page load vs dynamic conditional logic option to be customized in general or per step type within Gravity Flow:

  • gravityflow_page_load_logic_setting
  • gravityflow_page_load_logic_setting_user_input
  • gravityflow_page_load_logic_setting_approval

Any custom steps which use the Editable_Fields trait will also have a step type named version of this filter run (example: gravityflow_page_load_logic_setting_custom_type)

Parameters

Parameter Type Definition
$do_display boolean Whether or not to display the "page load" vs. "dynamic" option for the conditional logic setting.
$step Gravity_Flow_Step The current step.

Examples

Example 1: Modify the logic option for specific step IDs

add_filter( 'gravityflow_page_load_logic_setting', 'jo_gravityflow_page_load_specific_step', 10, 2 );
function jo_gravityflow_page_load_specific_step( $editable_fields, $step ) {
	if ( $step && $step->get_id() == 91 ) {
		return true;
	} else {
		return false;
	}
}

Example 2: Modify the logic for a custom step type and specific step ID

add_filter( 'gravityflow_page_load_logic_setting_apples', 'jo_gravityflow_page_load_specific_step_apples', 10, 2 );
function jo_gravityflow_page_load_specific_step_apples( $do_display, $step ) {
	if ( $step && $step->get_id() == 91 ) {
		return true;
	} else {
		return false;
	}
}

Placement

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