Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_not_spam_pending_actions

Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or third-party development.

Use the frm_not_spam_pending_actions filter to change which form actions can run when a spam entry is marked as not spam. These actions are listed as checkboxes in the Mark as not spam window, under "Run these form actions now?".

Form actions don't run for a submission that's saved as a spam entry. When you mark the entry as not spam, you can choose to run them.

Requirements

  • Formidable Forms 7.0 or later. The hook is part of Formidable Forms Lite.

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

How it works

By default, the list includes each of the form's actions that runs when an entry is created. Payment actions (eCommerce, Stripe, Square, PayPal, and Authorize.net AIM) and On Submit actions are left out, because they can't run after the submission. Every checkbox starts unchecked.

The filtered list also controls which chosen actions run. An action you remove from the list can't be run from this window.

The filter doesn't run for entries that were manually marked as spam. Their actions already ran when they were submitted.

Usage

add_filter( 'frm_not_spam_pending_actions', 'my_function_name', 10, 2 );

Parameters

  • $pending (WP_Post[]): The form actions, keyed by action ID. Each action's post_title is its action name. Its post_excerpt is its type, such as email or register.
  • $form (object): The form the spam entry belongs to.

Examples

Learn where to put the code when adding a custom PHP function to your site.

Leave Register User actions out

This example removes Register User actions from the list. Marking a spam entry as not spam then never creates a user account.

add_filter( 'frm_not_spam_pending_actions', 'my_frm_skip_register_actions', 10, 2 );
function my_frm_skip_register_actions( $pending, $form ) {
	foreach ( $pending as $action_id => $action ) {
		if ( 'register' === $action->post_excerpt ) {
			unset( $pending[ $action_id ] );
		}
	}
	return $pending;
}

Offer only email actions on one form

This example lists only Send Email actions for one form. Replace 5 with the ID of your form.

add_filter( 'frm_not_spam_pending_actions', 'my_frm_only_email_actions', 10, 2 );
function my_frm_only_email_actions( $pending, $form ) {
	if ( 5 !== (int) $form->id ) { // Change 5 to the ID of your form.
		return $pending;
	}
	foreach ( $pending as $action_id => $action ) {
		if ( 'email' !== $action->post_excerpt ) {
			unset( $pending[ $action_id ] );
		}
	}
	return $pending;
}
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms