# $field->callback()

Applies the callback function to the field

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/methods.php#L358>

****

```php
$field->callback(Closure $callback): mixed
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$callback` (required) | `Closure` | – | – |

## Return type

`mixed`

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


## Examples

```php
echo $page->title()->callback(function ($field) {
  $field->value = 'Title: ' . $field->value;
  return $field;
});
```