Docs & Support

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

frm_show_delete_all

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_show_delete_all filter to allow or block the Select all bulk delete on the Entries page.

Before Formidable Forms Pro 7.1, this filter showed or hid the Delete All Entries button. Pro 7.1 replaces that button with Select all. The filter now controls the select-all delete instead.

Requirements

  • Formidable Forms Pro. In version 7.1 and later, the filter controls the Select all delete. In earlier versions, it shows or hides the Delete All Entries button.

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

When the filter runs

The filter runs when someone confirms a delete with Select all. For example, the bar shows Select all 45 entries, or Select all 45 matching entries after a search. They click Select all, choose Delete in the Bulk Actions dropdown, and click Apply.

Formidable checks that the user has the frm_delete_entries capability first, and runs the filter only for users who have it. When the filter returns false, Formidable deletes nothing and shows the permission error message. By default, this message is "You do not have permission to do that."

The Select all bar appears only when the entries need more than one page. When all the entries fit on one page, the header checkbox selects them all. That is a normal bulk delete of checked entries, and the filter doesn't run.

Usage

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

Parameters

  • $show (bool): Whether to allow the select-all delete. Always true when the filter runs, because Formidable runs the filter only for users who have the frm_delete_entries capability.
  • $form_id (int): The ID of the form whose entries are deleted.

Examples

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

Block the select-all delete for everyone

This example stops everyone from deleting entries with Select all. Users can still delete entries they check one by one, including all the entries of a form that fits on one page.

add_filter( 'frm_show_delete_all', '__return_false' );

Allow only administrators to select all and delete

This example keeps the select-all delete for users who can manage the site, such as administrators. Other users who can delete entries can still delete the entries they check one by one.

add_filter( 'frm_show_delete_all', 'my_select_all_delete_for_admins', 10, 2 );
function my_select_all_delete_for_admins( $show, $form_id ) {
	return $show && current_user_can( 'manage_options' );
}

Change Log

Added in version 1.07.04. In version 7.1, it controls the select-all delete instead of the Delete All Entries button.

Limitations

  • The filter doesn't hide the Select all bar. It only decides what happens when the delete is confirmed: with false, the user sees "You do not have permission to do that" and no entry is deleted.
  • The filter doesn't apply to entries the user checks one by one, including when all the entries of a form fit on one page. It doesn't apply to Export to CSV.
  • The filter is not a permission check. The older frm_action=destroy_all URL on the Entries page still deletes all of a form's entries for a user who has the frm_delete_entries capability. The filter doesn't run for it. To stop a role from deleting entries at all, remove the frm_delete_entries capability from that role.
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.

    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms