A Contact Form 7 template is markup with tags embedded in it. Reasoning about the fields by reading that markup means writing a parser, and everyone who tries gets the edge cases wrong.
contact-form-7/list-form-fields returns the fields already parsed: name, type, whether the field is required, and its options and choices.
At a glance
| Ability | contact-form-7/list-form-fields |
| 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
This list doubles as the set of mail tags the form provides. A field named your-email is available in a mail body as [your-email], and a field that is not in this list is not available anywhere.
Entries with an empty name are controls rather than inputs — the submit button is the usual one. They are returned rather than filtered out so the field order in the response matches the order in the template.
Read this rather than contact-form-7/get-form-template whenever you want to know what the form collects. Read the template when you intend to change the layout itself.
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 that was parsed. |
fields | array | One entry per tag: name, type, required, options and values. |
count | integer | How many tags were found. |
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:
What does form 42 actually collect?
It resolves to one call:
{
"ability": "contact-form-7/list-form-fields",
"parameters": {
"form_id": 42
}
}Worth knowing
- Field names are the mail-tag names. This is the list to check a mail body against.
- Nameless entries are controls such as the submit button, not broken fields.
- For the tags a form provides including Contact Form 7’s built-in context tags, use
contact-form-7/list-mail-tags.
Related abilities
- List Contact Form Field Types — what types this site supports
- Add Contact Form Field — add one to the form
- List Contact Form Mail Tags — fields plus built-in context tags
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category