SubtleForms icon
Forms

SubtleForms hooks reference

SubtleForms 2.9.1 has 31 actions and 67 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when SubtleForms fires an action
add_action( 'subtleforms/register_extensions', function( $mgr ) {
	// Your code runs here.
}, 10, 1 );

// Change a value SubtleForms is about to use
add_filter( 'subtleforms/frontend/language', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • src/Frontend/FrontendAssets.php line 152 · used in 2 places
    /**
     * Language of the page the form is on, sent with every request the live form
     * makes (2.4.1). Translation add-ons return the current Polylang or WPML
     * language so the form's labels and confirmation come back translated. Empty
     * means no language.
     */
    apply_filters( 'subtleforms/frontend/language', '' );
  • src/Container.php line 217 · used in 2 places
    /**
     * Fires when extensions should be registered into ExtensionManager.
     */
    do_action( 'subtleforms/register_extensions', $mgr );
  • src/Tools/Import/Importer.php line 372 · used in 2 places
    /**
     * This action is documented in src/Tools/TransferService.php.
     */
    do_action( 'subtleforms/submission/imported', $created, $targetFormId, 'unread', (string) $row['created_at'] );
  • src/Support/ExtensionPoints.php line 108
    /**
     * Which extension points an active add-on provides. An add-on adds the names
     * of the features it runs, so the builder can tell "this form uses a feature
     * that is not active" from "it is".
     */
    apply_filters( 'subtleforms/addon/features', array() );
  • src/Admin/AdminMenu.php line 842
    /**
     * Filter how the admin app names the plugin.
     */
    apply_filters( 'subtleforms/admin_branding', $defaults );
  • src/Admin/AdminMenu.php line 738
    /**
     * Filter the data the admin app receives as `window.subtleformsAdmin`. Add-ons
     * add their own keys here.
     */
    apply_filters( 'subtleforms/admin_data', $admin_data, $hook );
  • src/Admin/AdminMenu.php line 430
    /**
     * Add-ons add their own submenu pages here. They land between Reports and
     * Settings, in the order the add-on adds them.
     */
    do_action( 'subtleforms/admin_menu', $this->caps );
  • src/Integrations/Registry.php line 63
    /**
     * Integrations an add-on lists in Settings.
     */
    apply_filters( 'subtleforms/admin/integrations', $result );
  • src/Admin/AdminPreload.php line 130
    /**
     * Filter the REST paths preloaded with a SubtleForms admin screen.
     */
    apply_filters( 'subtleforms/admin/preload_paths', self::defaultPaths( $screen ), $screen );
  • src/Admin/AdminMenu.php line 473
    /**
     * Whether the upgrade item is in the menu.
     */
    apply_filters( 'subtleforms/admin/upgrade_menu_item', ! self::companion_active() );
  • src/Support/Captcha/RecaptchaProvider.php line 155
    /**
     * Lowest reCAPTCHA v3 score that passes (0.0 to 1.0).
     */
    apply_filters( 'subtleforms/captcha/recaptcha_min_score', 0.5 );
  • src/Security/ClientIp.php line 96
    /**
     * Filter whether the visitor address from Cloudflare is used without the "Site
     * is behind Cloudflare" setting. Return false to use it only when that setting
     * is on.
     */
    apply_filters( 'subtleforms/client_ip/auto_cloudflare', true, $visitor );
  • src/Security/ClientIp.php line 114
    /**
     * Filter the proxy addresses and CIDR ranges whose forwarding headers are
     * believed.
     */
    apply_filters( 'subtleforms/client_ip/trusted_proxies', $trusted );
  • src/Integrations/Crm/Sender.php line 214
    /**
     * Change the contact before it is sent: a lifecycle stage, an owner, extra
     * properties. Return the Contact.
     */
    apply_filters( 'subtleforms/crm/contact', $built['contact'], $feed, $context, $service );
  • src/Integrations/Crm/Sender.php line 312
    /**
     * A contact was created or updated in a CRM.
     */
    do_action( 'subtleforms/crm/delivered', $result, $feed, $context, $service );
  • src/Integrations/Crm/Services.php line 186
    /**
     * Which CRMs an add-on adds extra options to (deals, companies, lifecycle
     * stage, owner, notes, conditional sending and so on). Return the slugs. This
     * plugin shows its note about the add-on only while the list is empty.
     */
    apply_filters( 'subtleforms/crm/extras', array() );
  • src/Integrations/Crm/Sender.php line 274
    /**
     * A request to a CRM failed for an entry.
     */
    do_action( 'subtleforms/crm/failed', $e->getMessage(), $feed, $context, $willRetry, $service );
  • src/Integrations/Crm/Sender.php line 233
    /**
     * Change the body of the create-or-update request. Return the array.
     */
    apply_filters( 'subtleforms/crm/request_body', $body, $contact, $feed, $context, $service );
  • src/Integrations/Crm/Services.php line 147
    /**
     * CRMs an add-on lists in Settings > Integrations > CRM.
     */
    apply_filters( 'subtleforms/crm/services', $result );
  • src/Integrations/Crm/Sender.php line 185
    /**
     * Skip an entry for a CRM. Return a short reason in plain words (for example
     * "the rule did not match") and the entry's activity log says "HubSpot:
     * skipped (reason)". Return null to send. Runs only for forms that have the
     * CRM switched on.
     */
    apply_filters( 'subtleforms/crm/skip_reason', null, $feed, $context, $service );
  • src/Api/DashboardApi.php line 100
    /**
     * Filter the dashboard figures before they are sent. Add-ons add their own
     * keys (for example `attention` rows) for their slots.
     */
    apply_filters( 'subtleforms/dashboard/data', $data );
  • src/Async/AsyncDispatcher.php line 308
    /**
     * Fires after a SubtleForms email was handed to wp_mail, whether or not it was
     * accepted. Add-ons delete temporary attachments here.
     */
    do_action( 'subtleforms/email/after_send', $job, $attachments );
  • src/Async/AsyncDispatcher.php line 287
    /**
     * Filter the files attached to a SubtleForms email.
     */
    apply_filters( 'subtleforms/email/attachments', $attachments, $job );
  • src/Integrations/EmailMarketing/Sender.php line 394
    /**
     * A person was added to or updated in a list.
     */
    do_action( 'subtleforms/email/marketing/delivered', $result, $feed, $context, $service );
  • src/Integrations/EmailMarketing/Services.php line 266
    /**
     * Which email marketing services an add-on adds extra options to (several
     * lists per form, conditional sending, tags from answers and so on). Return
     * the slugs. This plugin shows its note about the add-on only while the list
     * is empty.
     */
    apply_filters( 'subtleforms/email/marketing/extras', array() );
  • src/Integrations/EmailMarketing/Sender.php line 371
    /**
     * A request to an email marketing service failed for an entry.
     */
    do_action( 'subtleforms/email/marketing/failed', $e->getMessage(), $feed, $context, $willRetry, $service );
  • src/Integrations/EmailMarketing/Sender.php line 198
    /**
     * The feeds to send for an entry to one service. A feed is a set of settings
     * in the shape of a form's settings for that service (`list_id`, `fields`,
     * `merge_fields`, `tags`, `double_optin`, `update_existing`, `consent_field`)
     * with an `id`. This plugin returns one feed built from the form's own
     * settings. An add-on may add feeds or change the list. Runs only for forms
     * that have the service switched...
     */
    apply_filters( 'subtleforms/email/marketing/feeds', array( $default ), $context, $service );
  • src/Integrations/EmailMarketing/Sender.php line 317
    /**
     * Change the body of the add-or-update request, for example to add Mailchimp
     * interest groups or marketing permissions. Return the array.
     */
    apply_filters( 'subtleforms/email/marketing/request_body', $body, $sub, $feed, $context, $service );
  • src/Integrations/EmailMarketing/Services.php line 227
    /**
     * Email marketing services an add-on lists in Settings > Integrations > Email
     * marketing.
     */
    apply_filters( 'subtleforms/email/marketing/services', $result );
  • src/Integrations/EmailMarketing/Sender.php line 247
    /**
     * Skip a feed for this entry. Return a short reason in plain words (for
     * example "the rule did not match") and the entry's activity log says
     * "Mailchimp: skipped (reason)". Return null to send.
     */
    apply_filters( 'subtleforms/email/marketing/skip_reason', null, $feed, $context, $service );
  • src/Integrations/EmailMarketing/Sender.php line 336
    /**
     * A person was left out on purpose, for example someone who unsubscribed in
     * MailPoet.
     */
    do_action( 'subtleforms/email/marketing/skipped', $e->getMessage(), $e->reason(), $feed, $context, $service );
  • src/Integrations/EmailMarketing/Sender.php line 277
    /**
     * Change the subscriber before it is sent: tags from answers, a different
     * list, extra fields. Return the Subscriber.
     */
    apply_filters( 'subtleforms/email/marketing/subscriber', $sub, $feed, $context, $service );
  • src/Fields/CompositeParts.php line 99
    /**
     * Add parts to a composite field (Name, Address). Return the list you received
     * with your parts appended. Only appended parts are used: built-in parts
     * cannot be replaced or removed.
     */
    apply_filters( 'subtleforms/fields/composite_parts', $defs, $type );
  • src/Fields/FieldSettings.php line 746
    /**
     * The settings a field type shows in the builder, after the plugin added its
     * own. Add-ons add, change or replace controls here.
     */
    apply_filters( 'subtleforms/fields/inspector_controls', array_values( $controls ), $type );
  • src/Fields/FieldTypeAvailability.php line 62
    /**
     * Add-on field types that hold no answer.
     */
    apply_filters( 'subtleforms/fields/no_answer_types', array() );
  • src/Engine/FieldValidator.php line 392
    /**
     * Field types that never collect an answer.
     */
    apply_filters( 'subtleforms/fields/non_input_types', self::NON_INPUT_TYPES );
  • src/Engine/FieldValidator.php line 641
    /**
     * Validate a value for a field type an add-on registered. Return an error
     * message, or null when the value is fine. Unknown types are otherwise not
     * checked.
     */
    apply_filters( 'subtleforms/fields/validate_value', null, $type, $value, $field );
  • src/Repositories/FormsRepository.php line 884
    /**
     * A form and all its data were deleted for good.
     */
    do_action( 'subtleforms/form/deleted', $id );
  • src/Api/FormsApi.php line 1229
    /**
     * Fires after a form is duplicated.
     */
    do_action( 'subtleforms/form/duplicated', $newId, $id );
  • src/Support/AnswerFormatter.php line 161
    /**
     * Format an answer of a field type an add-on provides. Return a string to use
     * it, or null to let this plugin format it.
     */
    apply_filters( 'subtleforms/format/answer', null, $value, $field, $context );
  • src/Support/AnswerFormatter.php line 112
    /**
     * Filter the display context answers are formatted with. An add-on that
     * formats its own field types (see `subtleforms/format/answer`) adds what it
     * needs here.
     */
    apply_filters( 'subtleforms/format/context', $extra, $schema, is_array( $submission ) ? $submission : null );
  • src/Support/AnswerFormatter.php line 313
    /**
     * Format a list answer of a field type an add-on provides, one string per
     * item. Return an array to use it, or null.
     */
    apply_filters( 'subtleforms/format/items', null, $value, $field, $context );
  • src/Repositories/FormsRepository.php line 384
    /**
     * Filter a form schema before it is saved (draft or published). Add-ons use
     * this to store data they need at render time.
     */
    apply_filters( 'subtleforms/forms/schema_before_save', $schema, $formId, $activate );
  • src/Api/FormsApi.php line 773
    /**
     * A schema version was published (made active). Add-ons use this to register
     * the form's strings for translation.
     */
    do_action( 'subtleforms/forms/schema_published', $formId, $savedSchema['schema'] ?? $schema, $version );
  • src/Frontend/FrontendAssets.php line 180
    /**
     * Fires after the public form assets are enqueued, so add-ons can load their
     * own scripts alongside.
     */
    do_action( 'subtleforms/frontend/enqueued', $settings );
  • src/Frontend/FormDetector.php line 96
    /**
     * Form IDs a page will show, found before it is drawn. A theme or plugin that
     * prints a form from a template can add its ID here so the form's stylesheet
     * goes in the page head. Forms that are not listed still get their assets when
     * they render.
     */
    apply_filters( 'subtleforms/frontend/form_ids_on_page', $ids );
  • src/Frontend/InlineData.php line 71
    /**
     * Whether to print a form's data into the page so the form can be drawn
     * without a request to the REST API. Turn it off when a cache keeps pages long
     * after a form changes and the form must always be read live.
     */
    apply_filters( 'subtleforms/frontend/inline_form_data', true );
  • src/Frontend/FrontendAssets.php line 602
    /**
     * Whether to preload a form's data from the page head.
     */
    apply_filters( 'subtleforms/frontend/preload_schema', true, $formId );
  • src/Support/ImportOffer.php line 289
    /**
     * Filter raw detection before empty sources are removed.
     */
    apply_filters( 'subtleforms/import_offer/detect', $out );
  • src/Support/ImportOffer.php line 187
    /**
     * Filter the SubtleForms form count used by the import offer.
     */
    apply_filters( 'subtleforms/import_offer/forms_count', null );
  • src/Support/ImportOffer.php line 240
    /**
     * Filter the import-offer source list (after empty counts are dropped).
     */
    apply_filters( 'subtleforms/import_offer/sources', $sources );
  • src/Tools/Import/Importer.php line 262
    /**
     * A form was imported from another plugin.
     */
    do_action( 'subtleforms/import/imported', $formId, $source->id(), $id );
  • src/Tools/Import/Importer.php line 72
    /**
     * Filter the plugins SubtleForms can import forms from.
     */
    apply_filters( 'subtleforms/import/sources', $sources );
  • src/Engine/ConditionalLogic.php line 302
    /**
     * Evaluate an operator this plugin does not know (an add-on's operator).
     * Return true or false, or null for an unknown one, which does not match.
     */
    apply_filters( 'subtleforms/logic/evaluate_condition', null, $value, $operator, $compare, $compare2, $field, $this );
  • src/Engine/ConditionalLogic.php line 145
    /**
     * Whether advanced logic passes. An add-on that returned true from
     * `subtleforms/logic/supports` evaluates it here: several groups, the "any"
     * match, other operators, and logic on steps, actions and confirmations.
     * Return true or false, or null to leave it ignored.
     */
    apply_filters( 'subtleforms/logic/passes', null, $l, $values, $fields_by_key, $scope, $this );
  • src/Engine/ConditionalLogic.php line 210
    /**
     * Whether an add-on evaluates this logic. Return true to take it on (and
     * evaluate it with `subtleforms/logic/passes`). Logic that no one takes on is
     * ignored: the field is shown, the step, email or webhook runs, and the
     * default confirmation is used.
     */
    apply_filters( 'subtleforms/logic/supports', false, $l, $scope );
  • src/Support/MergeTags.php line 133
    /**
     * Compute the value of a field tag. Return a string to use it as the tag's
     * value (escaped like any other value in HTML mail), or null to let the plugin
     * resolve the tag.
     */
    apply_filters( 'subtleforms/merge_tags/value', null, $key, $part, $stored, $context );
  • src/Api/FormsApi.php line 1325
    /**
     * Filter the schema sent to the browser to render a form (never the builder's
     * copy). A translation add-on can translate strings here.
     */
    apply_filters( 'subtleforms/public_schema', $schema, $formId );
  • src/Tools/ReportData.php line 188
    /**
     * Filter a report before it is sent. Add-ons add series (views and conversion)
     * under `series_extra`.
     */
    apply_filters( 'subtleforms/reports/data', $report );
  • src/Security/PublicRoutes.php line 73
    /**
     * More REST routes visitors call while filling in a form, for example an
     * add-on's own public routes. Exact routes such as `/subtleforms/v1/example`.
     */
    apply_filters( 'subtleforms/rest/public_routes', array() );
  • src/Support/SchemaRepair.php line 360
    /**
     * Fires when a served schema had fields outside every step.
     */
    do_action( 'subtleforms/schema/repaired_orphans', $formId, $moved );
  • src/Analytics/SpamStats.php line 97
    /**
     * A submission was blocked as spam. Nothing about the visitor is passed.
     */
    do_action( 'subtleforms/spam/blocked', $formId, self::normalizeReason( $reason ) );
  • src/Api/PublicSubmitApi.php line 989
    /**
     * Filter the submitted values to add computed field values.
     */
    apply_filters( 'subtleforms/submission/computed_values', $payload, $schema );
  • src/Repositories/SubmissionsRepository.php line 363
    /**
     * Fires after an entry was deleted for good (2.4.1), so add-ons can remove
     * what they keep about it, such as integration logs.
     */
    do_action( 'subtleforms/submission/deleted', $id, $submission );
  • src/Support/RequestKeys.php line 44
    /**
     * Keys in a submission's `data` that are request values, not answers. They are
     * read by whoever needs them before the entry is stored, then dropped, and a
     * field cannot use them as its ID.
     */
    apply_filters( 'subtleforms/submission/request_keys', self::BUILT_IN );
  • src/Api/PublicSubmitApi.php line 736
    /**
     * Legacy extension hook: ( form id, submission row with payload ).
     */
    do_action( 'subtleforms/submission/saved', $formId, array_merge( $stored, array( 'payload' => $payload ) ) );
  • src/Repositories/SubmissionsRepository.php line 413
    /**
     * Fires when an entry is moved to the Trash.
     */
    do_action( 'subtleforms/submission/trashed', $id, $submission );
  • src/Repositories/SubmissionsRepository.php line 455
    /**
     * Fires when an entry is restored from the Trash.
     */
    do_action( 'subtleforms/submission/untrashed', $id, $status, $submission );
  • src/Repositories/SubmissionsRepository.php line 325
    /**
     * Fires after an entry was changed (status, meta, payload), so add-ons can
     * keep an index of it, such as an orders list.
     */
    do_action( 'subtleforms/submission/updated', $id, $submission );
  • src/Api/PublicSubmitApi.php line 906
    /**
     * Fires after an entry with a hold is stored, before its deferred actions run.
     * Report back with `$context->setMeta( 'store_result', array( ... ) )`:
     */
    do_action( 'subtleforms/submit/after_store', $submissionId, $submission, $hold, $context );
  • src/Api/PublicSubmitApi.php line 867
    /**
     * Filter what an add-on keeps for this submission before it is stored.
     */
    apply_filters( 'subtleforms/submit/before_store', array(), $formId, $schema, $payload, $request, $logicValues );
  • src/Api/PublicSubmitApi.php line 809
    /**
     * Filter the confirmation shown after a submission (for example to translate
     * it).
     */
    apply_filters( 'subtleforms/submit/confirmation', $out, $formId, $payload );
  • src/Api/PublicSubmitApi.php line 747
    /**
     * Filter the JSON returned to the browser after a successful submit. Add
     * `redirect` to send the visitor to another page.
     */
    apply_filters( 'subtleforms/submit/response', array( 'success' => true, 'submission_id' => $submissionId, 'confirmation' => self::resolveConfirmation( $formId, $activeSchema['schema'] ?? $activeSchema, $logicValues ), ), $submissionId, $formId, is_array( $hold ) ? $hold : array() );
  • src/Api/PublicSubmitApi.php line 933
    /**
     * Fires when an entry an add-on made a hold for is not stored after all (or is
     * stored as spam). Release what the hold keeps.
     */
    do_action( 'subtleforms/submit/store_abandoned', $hold, $formId, $submissionId );
  • src/Templates/FormTemplates.php line 46
    /**
     * Filter available form templates.
     */
    apply_filters( 'subtleforms/templates', $templates );
  • src/Tools/TransferPackage.php line 256
    /**
     * Entry meta records that go into an export and come back on import. The
     * default is every record another plugin saved on the entry. An add-on narrows
     * the list to the records it wants to travel.
     */
    apply_filters( 'subtleforms/transfer/entry_meta_keys', $keys, $record );
  • src/Uploads/Uploads.php line 357
    /**
     * How many files the control drawn for this upload field sends (1 to 20). The
     * upload field of this plugin sends one.
     */
    apply_filters( 'subtleforms/uploads/max_files', 1, $field );
  • src/Support/Webhooks.php line 248
    /**
     * Values the "selected" payload can send for an add-on's own groups (see
     * `subtleforms/webhooks/payload_groups`). With a null context the values are
     * for the sample in the builder.
     */
    apply_filters( 'subtleforms/webhooks/entry_values', $values, $context, $schema );
  • src/Support/Webhooks.php line 269
    /**
     * Extra groups of the "selected" webhook payload.
     */
    apply_filters( 'subtleforms/webhooks/payload_groups', array(), $schema );
  • src/Container.php line 160 · used in 2 places
    do_action( 'subtleforms/fields/register', $registry );
  • src/Api/PublicSubmitApi.php line 909 · used in 2 places
    do_action_deprecated( 'subtleforms/submit/finish_order', array( $submissionId, $submission, $hold, 'saved', $context ), '2.7.2', 'subtleforms/submit/after_store' );
  • src/Frontend/FrontendAssets.php line 739
    apply_filters( 'script_loader_src', SUBTLEFORMS_PLUGIN_URL . 'build/frontend/frontend.js', self::HANDLE );
  • src/Frontend/FormDetector.php line 112
    apply_filters( 'sidebars_widgets', get_option( 'sidebars_widgets', array() ) );
  • src/Support/functions.php line 26
    apply_filters( 'subtleforms_is_pro_active', false );
  • src/Admin/AdminMenu.php line 756
    do_action( 'subtleforms/admin_enqueue_scripts', $hook );
  • src/Support/Capabilities.php line 58
    apply_filters( 'subtleforms/capabilities', $this->base );
  • src/Support/Captcha/CaptchaManager.php line 68
    apply_filters( 'subtleforms/captcha/enabled', $enabled );
  • src/Support/Captcha/CaptchaManager.php line 79
    apply_filters( 'subtleforms/captcha/provider', $provider );
  • src/Support/Captcha/CaptchaManager.php line 368
    apply_filters( 'subtleforms/captcha/provider_config', $config, $provider_name );
  • src/Support/Captcha/CaptchaManager.php line 49
    apply_filters( 'subtleforms/captcha/providers', $this->providers );
  • src/Deactivator.php line 35
    do_action( 'subtleforms/deactivated' );
  • src/Plugin.php line 150
    do_action( 'subtleforms/loaded', $this );
  • src/Support/Mailer.php line 45
    apply_filters( 'subtleforms/mail/args', array( 'to' => $to, 'subject' => $subject, 'message' => $message, 'headers' => $headers, 'attachments' => $attachments, ) );
  • src/Support/Mailer.php line 75
    apply_filters( 'subtleforms/mail/sent', $sent, $mail_args );
  • src/Container.php line 184
    do_action( 'subtleforms/register_actions', $reg );
  • src/Api/PublicSubmitApi.php line 732
    do_action( 'subtleforms/submission/completed', $submissionId, $formId, $payload, $stored, $activeSchema['schema'] ?? $activeSchema );
  • src/Api/PublicSubmitApi.php line 870
    apply_filters_deprecated( 'subtleforms/submit/price_order', array( is_array( $hold ) ? $hold : array(), $formId, $schema, $payload, $request, $logicValues ), '2.7.2', 'subtleforms/submit/before_store' );
  • src/Admin/ThemePreviewAssets.php line 213
    do_action( 'wp_enqueue_scripts' );

Generated from SubtleForms's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Done for you

Rather have it built for you?

Tell us what should change and we’ll write and test the code using these hooks.

Plugin customisation

from $149

New features or changed behaviour, without editing the plugin’s files.

  • Built as a companion plugin, so updates never wipe it
  • Exact quote before we start
  • Tested on staging, then deployed

Typical turnaround: 3–7 business days

Choose this

Not sure which fits? Describe what you need and we’ll suggest the simplest option.

Can't find the right hook?

We can build the customisation for you. Describe what you need: