# $field->value()

Returns the field content. If a new value is passed, the modified field will be returned. Otherwise it will return the field value.

****

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

****

```php
$field->value(Closure|string|null $value = null): mixed
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$value` | `Closure`, `string` or `null` | `null` | – |

## Return type

`mixed`

This method modifies the existing `$field` object it is applied to and returns it again.


## Examples

```php
<?= $page->text()->value() ?>
```