A Contact Form 7 form is not a page and has no URL. It appears in exactly one place: wherever its shortcode has been pasted.
contact-form-7/get-form-shortcode returns that string for a given form id. It is the last step of creating a form and the first thing to check when a form “does not appear on the site”.
At a glance
| Ability | contact-form-7/get-form-shortcode |
| Toolset | Contact Form 7 — toolset/contact-form-7 |
| Group | Contact Form 7 › Forms |
| 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
The shortcode carries both the form’s hash and its title. Contact Form 7 matches on the hash, so a shortcode keeps working after the form is renamed even though the title inside it goes stale.
Insert the result into a post with the content abilities, or hand it to someone to paste into a page builder.
Going the other way — shortcode in hand, wanting the form — is contact-form-7/find-form with the hash.
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 shortcode belongs to. |
shortcode | string | The shortcode string, ready to paste. |
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:
Give me the shortcode for form 42 so I can drop it on the contact page.
It resolves to one call:
{
"ability": "contact-form-7/get-form-shortcode",
"parameters": {
"form_id": 42
}
}Worth knowing
- A form nobody can see is usually a form whose shortcode was never placed, not a broken form.
- The title inside the shortcode is cosmetic. Contact Form 7 matches on the hash.
- Page builders sometimes have their own Contact Form 7 widget. The shortcode works in all of them, but the widget may be the tidier option.
Related abilities
- Create Contact Form — the step before this one
- Find Contact Form — the reverse lookup, from shortcode to form
- List Contact Forms — every form’s shortcode at once
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category