diff --git a/app/Service/Forms/FormLogicConditionChecker.php b/app/Service/Forms/FormLogicConditionChecker.php index 14ea0dc..ba20104 100644 --- a/app/Service/Forms/FormLogicConditionChecker.php +++ b/app/Service/Forms/FormLogicConditionChecker.php @@ -23,7 +23,7 @@ class FormLogicConditionChecker // If it's not a group, just a single condition if (!isset($conditions['operatorIdentifier'])) { - return $this->propertyConditionMet($conditions['value'], $formData[$conditions['value']['property_meta']['id']]); + return $this->propertyConditionMet($conditions['value'], $formData[$conditions['value']['property_meta']['id']] ?? null); } if ($conditions['operatorIdentifier'] === 'and') { @@ -102,7 +102,7 @@ class FormLogicConditionChecker if(is_array($fieldValue)){ return count($fieldValue) === 0; } - return (!$fieldValue || $fieldValue !== '' || $fieldValue !== null); + return $fieldValue == '' || $fieldValue == null || !$fieldValue; } private function checkGreaterThan ($condition, $fieldValue): bool {