The template is the whole form as Contact Form 7 stores it: field tags, the labels wrapped around them, and whatever HTML someone added between.
contact-form-7/get-form-template returns it verbatim. That is the right read before a layout change, and the wrong one if you only want to know what the form collects.
At a glance
| Ability | contact-form-7/get-form-template |
| 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 read_contact_forms |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Nothing is parsed or normalised. What comes back is what is in the database, whitespace and all, so a round trip through this and contact-form-7/update-form-template preserves formatting.
For field-shaped questions — what fields exist, which are required, what choices a select offers — contact-form-7/list-form-fields answers them without you parsing markup.
The template is only one of a form’s five properties. contact-form-7/get-form returns all of them, including the mail templates that reference these field names.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
form_id | integer | Yes | Form post ID, as returned by contact-form-7/list-forms. |
What comes back
| Name | Type | What it is |
|---|---|---|
form_id | integer | The form the template belongs to. |
template | string | The raw template markup. |
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:
Show me the raw markup of form 42 — I want to restructure the layout.
It resolves to one call:
{
"ability": "contact-form-7/get-form-template",
"parameters": {
"form_id": 42
}
}Worth knowing
- Raw and unparsed. Round-tripping through update-form-template preserves the original formatting.
- Field names in here are referenced by the mail templates. Changing one in the markup breaks the notification silently.
- Take a copy with
contact-form-7/duplicate-formbefore a rewrite. There are no revisions behind a Contact Form 7 template.
Related abilities
- Update Contact Form Template — write it back
- List Contact Form Fields — the parsed version
- Get Contact Form — the template plus everything that depends on it
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category