A repeater row is usually several sub-fields, and an edit usually touches one of them. Rewriting the row wholesale to change a single value is how the other sub-fields quietly get cleared.
custom-fields/update-acf-repeater-row patches. Name the sub-fields you want changed; the ones you leave out keep their current values.
At a glance
| Ability | custom-fields/update-acf-repeater-row |
| Toolset | Advanced Custom Fields — toolset/acf |
| Group | Repeater & Flexible Content |
| Requires | Advanced Custom Fields Pro, plus a repeater field registered on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Rows are addressed by a 1-based index, matching ACF’s own API. The first row is 1, not 0 — the single commonest off-by-one in this suite.
An index outside the current range is refused with a typed error rather than silently ignored or appended, so a stale index surfaces as a failure instead of corrupting the field.
Because it is a patch and the index is explicit, the call is idempotent: applying the same row twice leaves the same state.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
target_type | string | No — defaults to post | What the value is attached to: post, user, term, comment or option. post covers pages and any custom post type. |
target_id | integer | string | Yes, for post, user, term and comment | The ID of the target. Optional for option, where it names a specific options page; omit it for the default options store. |
selector | string | Yes | Repeater or flexible-content field name (e.g. cards) or field key. |
index | integer | Yes | 1-based row index, matching ACF’s own API. The first row is 1, not 0. |
row | object | Yes | Sub-field name => new value. Omitted sub-fields keep their current values. |
apply_wp_slash | boolean | No — defaults to true | Runs wp_slash() over your strings before writing, so literal backslashes survive. Set it false only when you have already slashed the payload yourself. |
What comes back
| Name | Type | What it is |
|---|---|---|
index | integer | The row that was patched, 1-based. |
row_count | integer | How many rows the field holds. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
In the features repeater on page 87, change the second card’s body text but leave its title alone.
It resolves to one call:
{
"ability": "custom-fields/update-acf-repeater-row",
"parameters": {
"target_type": "post",
"target_id": 87,
"selector": "features",
"index": 2,
"row": {
"body": "Every call is logged, with the caller and the arguments."
}
}
}Worth knowing
- Read the field with
custom-fields/get-acf-fieldfirst to learn the valid index range. Indexes shift whenever a row is added or removed. - To replace a row completely rather than patch it, pass every sub-field.
- Requires ACF Pro.
Related abilities
- Get ACF Field Value — find the index you mean
- Add Repeater Row — when the row does not exist yet
- Remove Repeater Row — delete it instead of patching
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category