Developer Extensions

Hooks System

Formcierge exposes a comprehensive set of WordPress actions and filters, allowing developers to customise virtually every aspect of the plugin’s behaviour without modifying core files. All hooks are prefixed with formcierge_.

The full reference is available at /hooks/.

Addon Architecture

Formcierge addons are standalone WordPress plugins that depend on the core plugin. Addons hook into the plugins_loaded action and register themselves via the formcierge_addons filter.

The builder UI is extensible via the window.formcierge JavaScript API, which exposes:

  • window.formcierge.registerBuilderButton(config) — add a button to the builder toolbar
  • window.formcierge.registerBuilderPanel(config) — add a settings panel in the right sidebar
  • window.formcierge.registerCommand(config) — register a command palette action
  • window.formcierge.stores — access Zustand state stores directly

Custom Field Types

Custom field types can be registered via the JavaScript Field Registry. A field type definition includes a React component for the builder preview and another for frontend rendering, plus metadata for the AI system.

AI Provider Registration

Custom AI providers (e.g. a self-hosted LLM) can be registered using the formcierge_register_ai_providers action. Your provider class must implement the FormciergeAPIAIProviderInterface.