Docs & Support

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

frm_entry_marked_not_spam

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_entry_marked_not_spam action to run code after someone marks a spam entry as not spam. When it runs, the entry is back in the Entries tab. The form actions the user chose have already run.

Form actions don't run for a submission that's saved as a spam entry. When the entry is marked as not spam, the user can choose which of those actions to run.

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.

When it fires

The action runs after a user confirms Mark as not spam for a spam entry. The user starts from Not spam in the Spam tab of the entries list, or from Mark as Not Spam on the entry's page.

For an entry that was manually marked as spam, no form actions are offered. $action_ids is empty, because the entry's actions already ran when it was submitted.

Usage

add_action( 'frm_entry_marked_not_spam', 'my_function_name', 10, 2 );

Parameters

  • $entry_id (int): The ID of the entry that was marked as not spam.
  • $action_ids (int[]): The IDs of the form actions the user chose to run. Actions with conditional logic only run when their conditions are met. The array is empty when no actions were chosen.

Examples

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

Log which form actions were run

This example writes the user, the entry ID, and the chosen form action IDs to the PHP error log.

add_action( 'frm_entry_marked_not_spam', 'my_frm_log_not_spam', 10, 2 );
function my_frm_log_not_spam( $entry_id, $action_ids ) {
	$user    = wp_get_current_user();
	$actions = $action_ids ? implode( ', ', $action_ids ) : 'none';
	error_log( sprintf( '%s marked entry %d as not spam. Form actions run: %s', $user->user_login, $entry_id, $actions ) );
}
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