> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/developers/functions/get_acpt_meta_field_before_and_after.md).

# get\_acpt\_meta\_field\_before\_and\_after

Get the before/after advanced-option text configured on a meta field

Convenience wrapper around [`get_acpt_meta_field_advanced_option`](/developers/functions/get_acpt_meta_field_advanced_option.md) that fetches both the `before` and `after` advanced-option values for a field in one call.

### Usage

```php
$context = get_acpt_meta_field_before_and_after('my_box', 'price_field');

echo $context['before'] . $value . $context['after'];
```

### Parameters

| Parameter    | Type   | Required | Description       |
| ------------ | ------ | -------- | ----------------- |
| `box_name`   | string | Required | The meta box name |
| `field_name` | string | Required | The field name    |

### Return

| Type    | Description                                                                                                        |
| ------- | ------------------------------------------------------------------------------------------------------------------ |
| `array` | `['before' => ..., 'after' => ...]` — either value is `null` when not configured, or when the field does not exist |
