Create SureForms Form is a WordPress ability from SureForms — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Create SureForms Form

Write
SureForms Forms sureforms/create-form

Create a new SureForms form from a title, an array of field definitions, and optional metadata.

Requires the SureForms plugin on WordPress 6.9+ (the Abilities API is gated behind function_exists('wp_register_ability'), so it degrades gracefully on WP 6.4-6.8). Abilities only register when the 'srfm_abilities_api' option is enabled in SureForms' AI settings, and every ability requires the current user to have the 'manage_options' capability. Abilities that create or modify data additionally require the 'srfm_abilities_api_edit' option to not be explicitly disabled; abilities that permanently delete data additionally require 'srfm_abilities_api_delete' to not be explicitly disabled.

What it does

This ability builds a new SureForms form by reusing the plugin's existing Field_Mapping engine to turn a list of field definitions into Gutenberg block markup. It supports all standard SureForms field types (input, email, textarea, dropdown, checkbox, multi-choice, phone, number, url, address, gdpr, payment, inline-button) and accepts optional formMetaData for confirmation messages, compliance/entry-retention rules, instant-form styling, email notifications, and submission restrictions. The new form is saved as a WordPress post with a configurable formStatus (publish, draft, or private; defaults to draft) and the response includes the ready-to-use shortcode. This lets an AI assistant turn a plain-language form request straight into a working, embeddable SureForms form.

See it in action

You ask your AI assistant

"Create a draft contact form with name, email, and message fields, and set the confirmation message to 'Thanks, we'll be in touch soon.'"

Inputs

Name Type Required Description
formTitle string Yes Title of the form in 5-10 words.
formFields array Yes Array of form field definitions; each item requires at minimum a label and fieldType.
formMetaData object No Optional metadata: formConfirmation, compliance, instantForm, general, styling, formStyling, emailNotification, formRestriction, and formCustomCss settings.
formStatus string No Form publish status: publish, draft, or private. Defaults to draft.

Returns

An object with the new form's form_id, title, status, admin edit_url, and shortcode.

Permission

Requires the 'manage_options' capability, the 'srfm_abilities_api' master option enabled, and the 'srfm_abilities_api_edit' gate option must not be explicitly disabled.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.