Export Form Definition is a WordPress ability from Ninja Forms — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Export Form Definition
Read-onlyExport a form to Ninja Forms' .nff file format (settings, fields, and actions).
Requires the Ninja Forms plugin on WordPress 6.9+ for the Abilities API (all 32 abilities are registered only when the wp_register_ability() function exists, via NF_Abilities_Integration::load_abilities_api() running on plugins_loaded). Every ability is gated by the same ninja_forms_ability_can_manage_forms() permission callback, requiring the caller to hold WordPress's manage_options capability or Ninja Forms' own nf_edit_forms capability.
What it does
This ability serializes a form's settings, fields, and actions into the JSON content used by Ninja Forms' .nff export format, along with a suggested filename. As with export-submissions, the calling assistant is expected to actually write the returned content to a local .nff file rather than just displaying the JSON to the user. It pairs with ninjaforms/import-form for moving or backing up a form.
See it in action
You ask your AI assistant
"Export form 12 as a .nff file so I can back it up."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| form_id | integer | Yes | The numeric ID of the form to export. |
Returns
An object with a 'success' boolean, a 'message', the 'form_id', 'form_title', the export 'content' as a JSON string, and a suggested 'filename'.
Permission
The current user must have WordPress's 'manage_options' capability or Ninja Forms' own 'nf_edit_forms' capability (checked via the shared ninja_forms_ability_can_manage_forms() permission callback).
More Ninja Forms abilities
Add Action
Add a post-submission action to a form — email, redirect, success message, or save.
Add Calculation
Add a calculator formula to a form for use in calc fields and conditional logic.
Add Field
Add a single field to an existing form, to be called once per field when building out a form.
Create Form
Create a new Ninja Forms form, optionally with fields, actions, and calculations, in a single call.
Delete Action
Permanently delete an action from a form.
Delete Calculation
Permanently delete a calculation from a form.