contact-form-7/update-form-field rewrites a single tag. The surrounding markup, the labels and every other field are left byte for byte as they were, which is what makes it safe to run against a hand-crafted template.
You can change the type, the required flag, the options and the choices. You cannot change the name — and that omission is deliberate.
At a glance
| Ability | contact-form-7/update-form-field |
| Toolset | Contact Form 7 — toolset/contact-form-7 |
| Group | Contact Form 7 › Fields & Template |
| Requires | Contact Form 7, active on the site |
| Capability | manage_options, plus edit_contact_forms |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
Why you cannot rename a field here
A field name is not private to the template. It is also the mail tag, and it may appear in either mail body, in a subject line, or in the additional settings.
A rename that updates the template and leaves those behind produces a form that still submits, still reports success, and still sends a notification — with a blank line where the value used to be. Nothing in the WordPress admin flags it.
So renaming is a two-step operation you do knowingly: remove the field, add it under the new name, then run contact-form-7/validate-mail-tags and fix whatever it reports.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
form_id | integer | Yes | Form post ID, as returned by contact-form-7/list-forms. |
name | string | Yes | Name of the field to change. Not itself changeable. |
type | string | No | New field type. |
required | boolean | No | Whether the field is required. |
options | array of strings | No | Tag options, e.g. class:wide, id:enquiry-phone or maxlength:40. Write each as key:value; a value containing spaces is quoted for you, and one with a space but no key is refused. |
values | array of strings | No | Replacement choices for a select or radio field. |
What comes back
| Name | Type | What it is |
|---|---|---|
form_id | integer | The form that was written. |
field | object | The field as parsed back out of the template. |
tag | string | The rewritten tag. |
template | string | The template after the change. |
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:
Make the phone field on form 42 optional instead of required.
It resolves to one call:
{
"ability": "contact-form-7/update-form-field",
"parameters": {
"form_id": 42,
"name": "your-phone",
"required": false
}
}Worth knowing
- Idempotent — applying the same change twice leaves the same tag.
- Only the named tag is touched. Labels and surrounding HTML are preserved exactly.
- To rename: remove, re-add, then validate the mail tags. There is no safe one-step rename.
Related abilities
- List Contact Form Fields — find the exact field name
- Remove Contact Form Field — step one of a rename
- Validate Contact Form Mail Tags — step three of a rename
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category