Remove Field 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 →

Remove Field

Destructive
Ninja Forms Forms ninjaforms/remove-field

Remove a single field from a form, with a mandatory export-and-confirm workflow when the field has submission data.

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 removes one field from a form, but only after a multi-step data-protection workflow when the field already has submission data attached: the first call reports how many submissions hold data for that field and refuses to proceed; a follow-up call auto-exports the field's data to CSV and returns a required confirmation phrase; only a third call carrying the exact typed phrase 'DELETE [FIELD_NAME] DATA FROM [COUNT] SUBMISSIONS' actually deletes the field. It processes exactly one field per call — bulk 'remove all unused fields' requests must be worked one field at a time through this full workflow. This protects against an AI assistant silently discarding collected submission data while still letting it clean up a form's fields.

See it in action

You ask your AI assistant

"Remove the old 'Referral Source' field from form 12 — walk me through confirming since it has existing submission data."

Inputs

Name Type Required Description
form_id integer Yes Form ID containing the field.
field_id integer Yes The numeric ID of the field to remove.
export_completed boolean No Set to true once the CSV export step has been completed and reviewed.
user_confirmation_phrase string No Must exactly match 'DELETE [FIELD_NAME] DATA FROM [COUNT] SUBMISSIONS' to authorize the final deletion.

Returns

An object with a 'success' boolean, the 'form_id', 'field_id', and a 'message' — which, on the first two calls, instead explains the required next confirmation step.

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).

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.