# $field->or()

Provides a fallback if the field value is empty

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Content/Field.php#L153>

****

```php
$field->or(mixed $fallback = null): Kirby\Content\Field
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$fallback` | `mixed` | `null` | – |

## Return types

`Kirby\Content\Field`

This method does not modify the existing `$field` object but returns a new object with the changes applied. <a href="https://getkirby.com/docs/guide/templates/php-api#immutable-objects">Learn more &rarr;</a>


## Examples

### Replace an empty field with another field

```php
<meta name="description" content="<?= $page->description()->or($site->description()) ?>">
```

### Replace an empty field with a fixed string

```php
<meta name="description" content="<?= $page->description()->or('Default description') ?>">
```

### Replace an empty field with `null`

```php
<img <?= Html::attr(['width' => $file->displayWidth()->or(null)]) ?>>
```