Docs & Support

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

frm_filename_spam_keywords

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 3rd party development.

This hook can be used to validate that uploaded file is not obviously spam.

Usage

apply_filters( 'frm_filename_spam_keywords', 'my_custom_function' );

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

Parameters

  • $spam_keywords (array) by default it contains the following keywords fortnite, vbucks, roblox, robux

Examples

Add a new keyword to classify it as spam

This example will add a new keyword to a blacklist to classify it as spam

add_filter( 'frm_filename_spam_keywords', 'my_custom_function' );
function my_custom_function( $spam_keywords ) {
    array_push( $spam_keywords, 'another' );
    return $spam_keywords;
}

Replace the keyword 'another' with the one you need to add

Remove one of the default keywords classified as spam

This example will remove one of the default keywords classified as spam

add_filter( 'frm_filename_spam_keywords', 'my_custom_function' );
function my_custom_function( $spam_keywords ) {
    $key = array_search( 'robux', $spam_keywords ); // Replace the keyword 'robux' with the one you need to remove
	if ( false !== $key ) {
		unset( $spam_keywords[ $key ] );
	}
    return $spam_keywords;
}

Currently these are the default keywords fortnite, vbucks, roblox, robux

Disable spam validation for this hook

This example will disable the spam validation for this hook

add_filter( 'frm_filename_spam_keywords', '__return_false' );

Change Log

Added in version 4.10.02

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 © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms