Add Field is a WordPress ability from WPForms — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Add Field
WriteAdd a new field of a given type to an existing WPForms form.
Requires the WPForms plugin on WordPress 6.9+ (abilities only register when the wp_register_ability() function exists). Read abilities need the WPForms 'view_forms' or 'view_form_single' capability. The four write abilities (create-form, update-form-settings, add-field, update-field) additionally require the 'Enable MCP Write Access' toggle (the ai-mcp-write-enabled setting under WPForms → Tools → AI MCP) to be turned on, plus the 'create_forms' or 'edit_form_single' capability — without both, they return a 403 error and are hidden from MCP clients entirely.
What it does
This ability adds a new field to a form, given a form_id and a field type plus any of the curated properties allowed for that type (label, description, required, size, label_hide, placeholder, default_value, input_columns, style, extensions, max_size, max_file_number, media_library, or choices). The type value is intentionally unvalidated at the schema level — the underlying FormMutator checks whether the type is actually available on this install (rejecting Pro-only types on Lite, or entirely unknown types) and returns a 422 wpforms_field_type_unavailable error if not. An AI assistant should call describe-editing-schema first to know which types and properties are supported. This ability requires 'Enable MCP Write Access' to be turned on.
See it in action
You ask your AI assistant
"Add a required Email field to form 42."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| form_id | integer | Yes | The ID of the form to add the field to. |
| type | string | Yes | The field type to add (e.g. text, textarea, email, number, select, radio, checkbox, name; Pro-only types include phone, date-time, file-upload). Availability is validated server-side; call describe-editing-schema to see which types are supported on this install. |
| label | string | No | The field's label, if supported by the chosen type. |
| description | string | No | The field's description text, if supported by the chosen type. |
| required | boolean | No | Whether the field is required, if supported by the chosen type. |
| size | string | No | Field width: small, medium, or large, if supported by the chosen type. |
| label_hide | boolean | No | Whether to hide the field label, if supported by the chosen type. |
| placeholder | string | No | Placeholder text, if supported by the chosen type. |
| default_value | string | No | Default value, if supported by the chosen type. |
| input_columns | string | No | Layout of choice inputs ('', inline, '2', or '3'), for choice-based types like radio/checkbox. |
| choices | array | No | Array of { label, value } choice objects, for choice-based types like select/radio/checkbox. |
| style | string | No | classic or modern rendering style, for types like select (Dropdown) or file-upload. |
| extensions | string | No | Comma-separated list of allowed file extensions, for the Pro-only file-upload type. |
| max_size | integer | No | Per-file maximum upload size in megabytes, for the Pro-only file-upload type. |
| max_file_number | integer | No | Maximum number of files uploadable via the modern uploader, for the Pro-only file-upload type. |
| media_library | boolean | No | Whether to also store uploads in the WordPress Media Library, for the Pro-only file-upload type. |
Returns
An object with the form_id, the new field_id (integer), and the field's type.
Permission
The current user must have the WPForms 'edit_form_single' capability for the given form_id, and the site's 'Enable MCP Write Access' setting must be turned on; otherwise a 403 WP_Error is returned.
More WPForms abilities
Create Form
Create a new WPForms form, optionally pre-populated with fields and settings.
Describe Editing Schema
Discover which field types, field properties, and form settings can currently be created or edited.
Get Form
Get a single WPForms form's metadata, safe settings, and optionally its fields.
Get Form Stats
Get basic stats for a form; detailed entry statistics require WPForms Pro.
List Forms
List WPForms forms filtered by status, with pagination.
Update Field
Update properties of an existing field on a WPForms form.