> 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/save_acpt_meta_box.md).

# save\_acpt\_meta\_box

Create or update a meta box

Create or update a meta box.

### Usage

```php
save_acpt_meta_box([
    'groupName' => 'group',
    'name'      => 'new-box',
    'label'     => 'New box',
    'new_name'  => 'new-box-modified',
    'fields'    => [
        [
            'name'            => 'field',
            'label'           => 'Field',
            'type'            => 'Text',
            'show_in_archive' => false,
            'is_required'     => false,
            'default_value'   => 'foo',
            'description'     => 'lorem ipsum dolor facium',
        ],
    ],
]);
```

### Parameters

| Parameter   | Type   | Required | Description                                                                                                                             |
| ----------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `groupName` | string | Required | The field group name (note: unlike most other functions, `group_name` is **not** accepted here — only the camelCase key works)          |
| `name`      | string | Required | The meta box name (slug)                                                                                                                |
| `new_name`  | string | Optional | The new box name when renaming an existing box                                                                                          |
| `label`     | string | Optional | The human-readable box label                                                                                                            |
| `fields`    | array  | Optional | Array of field definitions — see [`save_acpt_meta_field`](/developers/functions/save_acpt_meta_field.md) for the field object structure |

### Return

| Type   | Description                           |
| ------ | ------------------------------------- |
| `bool` | `true` on success, `false` on failure |
