Skip to main content

evaluate_conditional_logic()

public static function evaluate_conditional_logic( $logic, $form, $entry )

Evaluates conditional logic based on the specified $logic variable. This method is used when evaluating non-field conditional logic such as Notification, Confirmation and Feeds.

NOTE: There is a future refactoring opportunity to reduce code duplication by merging this method with GFFormsModel::evaluate_conditional_logic(), which currently handles field conditional logic.

Source: common.php:5142

Parameters

NameTypeDefaultDescription
$logicarrayThe conditional logic configuration array with all the specified rules.
$formarrayThe current Form object.
$entryarrayThe current Entry object.

Returns

  • bool — Returns true if the conditional logic passes, false otherwise.