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

Start free trial

Get Contact Form Template

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

Abilitycontact-form-7/get-form-template
ToolsetContact Form 7 — toolset/contact-form-7
GroupContact Form 7 › Fields & Template
RequiresContact Form 7, active on the site
Capabilitymanage_options, plus read_contact_forms
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
form_idintegerYesForm post ID, as returned by contact-form-7/list-forms.

What comes back

NameTypeWhat it is
form_idintegerThe form the template belongs to.
templatestringThe raw template markup.
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:

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-form before a rewrite. There are no revisions behind a Contact Form 7 template.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading