bookmark_bordergform_entry_is_spam

Description

The gform_entry_is_spam filter is used to mark entries as spam.

Usage

The following would apply to all forms.

add_filter( 'gform_entry_is_spam', 'your_function_name', 10, 3 );

To limit the scope of your function to a specific form, append the form id to the end of the hook name. (format: gform_entry_is_spam_FORMID)

add_filter( 'gform_entry_is_spam_6', 'your_function_name' );

Parameters

  • $is_spam bool
    Indicates if the entry is already marked as spam.

  • $form Form Object
    The form object.

  • $entry Entry Object
    The current entry.

Examples

add_filter( 'gform_entry_is_spam', 'it_is_all_spam', 10, 3 );

function it_is_all_spam( $is_spam, $form, $entry ) {
  return true;
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GFFormDisplay::handle_submission() in form_display.php