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

# acpt\_field\_has\_rows

Check if a Repeater or List field has nested rows

Check whether a Repeater or List field has at least one nested row of values.

### Usage

```php
if (acpt_field_has_rows([
    'post_id'    => 123,
    'box_name'   => 'box',
    'field_name' => 'field',
])) {
    // loop through rows
}
```

### Parameters

| Parameter              | Type    | Required    | Description                          |
| ---------------------- | ------- | ----------- | ------------------------------------ |
| `post_id`              | integer | Conditional | The post ID                          |
| `term_id`              | integer | Conditional | The term ID                          |
| `user_id`              | integer | Conditional | The user ID                          |
| `comment_id`           | integer | Conditional | The comment ID                       |
| `wc_product_attribute` | integer | Conditional | The WooCommerce product attribute ID |
| `option_page`          | string  | Conditional | The option page slug                 |
| `box_name`             | string  | Required    | The meta box name                    |
| `field_name`           | string  | Required    | The Repeater or List field name      |

Exactly one of `post_id`, `term_id`, `user_id`, `comment_id`, `option_page`, or `wc_product_attribute` must be provided to identify the location.

### Return

| Type   | Description                                                 |
| ------ | ----------------------------------------------------------- |
| `bool` | `true` if the field has one or more rows, `false` otherwise |
