diff --git a/src/Fields/FieldsContract.php b/src/Fields/FieldsContract.php index 1bb85206..e76d5f3d 100644 --- a/src/Fields/FieldsContract.php +++ b/src/Fields/FieldsContract.php @@ -138,6 +138,11 @@ public function appendFilamentComponentsOptions($component, $zeusField, bool $ha } $relatedFieldArray = Arr::wrap($get('zeusData.' . $relatedField)); + + // In the example where a field is only visible when the related field is NOT checked, + // we need to convert booleans to strings for in_array comparison + $relatedFieldArray = array_map(fn($value) => is_bool($value) ? ($value ? 'true' : 'false') : $value, $relatedFieldArray); + if (in_array($relatedFieldValues, $relatedFieldArray)) { return true; }