Contact Form 7 does not use the trash. Deleting a form removes it, both its mail templates, its messages and its settings immediately and permanently — there is no Restore link afterwards, because there is nowhere to restore it from.
There is a second consequence that is easy to miss: every page still containing that form’s shortcode now renders nothing at all. No error, no placeholder — the section of the page simply disappears.
Before you run it
This cannot be undone, and WordPress’s trash will not catch it. The call refuses without confirm: true. Run contact-form-7/duplicate-form first if there is any chance you will want the form back, and search your content for the shortcode before you delete the form it points at.
At a glance
| Ability | contact-form-7/delete-form |
| Toolset | Contact Form 7 — toolset/contact-form-7 |
| Group | Contact Form 7 › Forms |
| Requires | Contact Form 7, active on the site |
| Capability | manage_options, plus delete_contact_form |
| Safety | Destructive — deletes stored values, and refuses to run without confirm: true |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The confirmation gate runs before anything is touched, so a call without confirm: true comes back with a typed error and an untouched site. That is what makes it safe to let an assistant propose the deletion and a human approve it.
Deleting an id that no longer exists reports the same result rather than failing, so the call is idempotent — a retry cannot delete something else by accident.
Duplicating first is the cheap insurance. contact-form-7/duplicate-form copies the template, both mail templates, the messages and the settings under a new title in one call.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
form_id | integer | Yes | Form post ID, as returned by contact-form-7/list-forms. |
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
form_id | integer | The id that was deleted. |
title | string | The title of the form that was deleted, for the record. |
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:
Delete form 61, the old newsletter signup — I have checked nothing links to it.
It resolves to one call:
{
"ability": "contact-form-7/delete-form",
"parameters": {
"form_id": 61,
"confirm": true
}
}Worth knowing
- No trash, no revisions, no undo. The only backup is a copy you made first.
- Pages holding the shortcode render nothing afterwards, silently.
- Requires the
delete_contact_formcapability, which is narrower than the one the editing abilities use.
Related abilities
- Duplicate Contact Form — take a copy before you delete
- Get Contact Form — read it out first if you want a record
- List Contact Forms — confirm which id you mean
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category