Docs & Support

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

Developer DocumentationFormidable HooksDisplay Data
frm_display_inner_content_before_add_wrapper

frm_display_inner_content_before_add_wrapper

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.

Use this hook to allow filtering the inner content of a grid view before the wrapper element is added.

Usage

add_filter( 'frm_display_inner_content_before_add_wrapper', 'custom_function', 10, 3 );

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

Parameters

  • $inner_content (string): The inner content.
  • $view (object) : View object.
  • $args (array) :
    • $entry_ids (array): Entry ids on the current page.
    • $total_count (int): Number of entries on the current page.
    • $record_count (int): Total number of entries.
    • $pagination (string): HTML of pagination.
    • $is_table_view (bool): Check if it is a table view
    • $is_grid_view (bool): Check if it is a grid view
    • $box_content (array): The data of grid boxes or table columns.

Examples

Wrap all grid items inside a custom wrapper

add_filter( 'frm_display_inner_content_before_add_wrapper', 'grid_view_custom_wrapper', 10, 3 );
function grid_view_custom_wrapper( $inner_content, $view, $args ) {
if ( ! empty( $args['is_grid_view'] ) ) {
$inner_content = '<div class="frm_grid_container">' . $inner_content . '</div>';
}
return $inner_content;
}

Show total of items at the end of a table view

There may be times when an email or another form action is set to trigger on update or after successful payment, but you really only want it to trigger once. This example uses two hooks: one to set when an action has been triggered, and one to stop it the next time.

add_filter( 'frm_display_inner_content_before_add_wrapper', 'table_view_total_row', 10, 3 );
function table_view_total_row( $inner_content, $view, $args ) {
	if ( ! empty( $args['is_table_view'] ) ) {
		$total_columns = count( $args['box_content'] );
		$total_items   = count( $args['record_count'] );
		$inner_content .= 'Total items: ' . intval( $total_items ) . '';
	}
return $inner_content;
}
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