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

Start free trial

List Contact Form Fields

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

Abilitycontact-form-7/list-form-fields
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

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

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

What comes back

NameTypeWhat it is
form_idintegerThe form that was parsed.
fieldsarrayOne entry per tag: name, type, required, options and values.
countintegerHow many tags were found.
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:

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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading