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

Start free trial

Duplicate Contact Form

The fastest way to build a form that works is to copy one that already does. contact-form-7/duplicate-form takes the template, both mail templates, the validation messages and the additional settings across under a new title.

It is also the backup step this suite otherwise lacks. Contact Form 7 keeps no revisions and no trash, so a copy made before a large edit is the only way back.

At a glance

Abilitycontact-form-7/duplicate-form
ToolsetContact Form 7 — toolset/contact-form-7
GroupContact Form 7 › Forms
RequiresContact Form 7, active on the site
Capabilitymanage_options, plus edit_contact_forms
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

The copy is a new form with its own id and its own shortcode. Nothing about the original changes, and no page starts showing the copy — it is unreferenced until you place its shortcode somewhere.

Omit title and the copy is named after the original with _copy appended, which is deliberately ugly so a forgotten backup is obvious in the admin list.

Mail templates come across verbatim, recipient included. A duplicated form will send to the same address as the original until you change it.

Input

NameTypeRequiredWhat it is
form_idintegerYesForm post ID, as returned by contact-form-7/list-forms.
titlestringNoTitle for the copy. Defaults to the original plus _copy.

What comes back

NameTypeWhat it is
formobjectThe new form, with its own id and shortcode.
source_idintegerThe form it was copied from.
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:

Make a copy of form 42 called “Contact form — staging” before I rewrite the mail.

It resolves to one call:

{
  "ability": "contact-form-7/duplicate-form",
  "parameters": {
    "form_id": 42,
    "title": "Contact form — staging"
  }
}

Worth knowing

  • Not idempotent — run it twice and you have two copies.
  • The copy inherits the original’s recipient. Change it before the copy goes live, or two forms will be mailing the same inbox.
  • This is the closest thing to a backup Contact Form 7 offers. Use it before contact-form-7/delete-form or a template rewrite.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading