30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Update Repeater Row

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

Abilitycustom-fields/update-acf-repeater-row
ToolsetAdvanced Custom Fields — toolset/acf
GroupRepeater & Flexible Content
RequiresAdvanced Custom Fields Pro, plus a repeater field registered on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
target_typestringNo — defaults to postWhat the value is attached to: post, user, term, comment or option. post covers pages and any custom post type.
target_idinteger | stringYes, for post, user, term and commentThe ID of the target. Optional for option, where it names a specific options page; omit it for the default options store.
selectorstringYesRepeater or flexible-content field name (e.g. cards) or field key.
indexintegerYes1-based row index, matching ACF’s own API. The first row is 1, not 0.
rowobjectYesSub-field name => new value. Omitted sub-fields keep their current values.
apply_wp_slashbooleanNo — defaults to trueRuns 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

NameTypeWhat it is
indexintegerThe row that was patched, 1-based.
row_countintegerHow many rows the field holds.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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-field first 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 the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading