Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

frm_display_inner_content_before_add_wrapper

Last Updated: March 13, 2023

Knowledge Base → Extend Formidable Forms → Formidable Hooks - for Developers → Display Data → 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.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

Usage

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

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

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 .= '<tr><td colspan="' . intval( $total_columns ) . '">Total items: ' . intval( $total_items ) . '</td></tr>';
	}
	return $inner_content;
}
  • Usage
  • Parameters
  • Examples
    • Wrap all grid items inside a custom wrapper
    • Show total of items at the end of a table view
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

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.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable FormsĀ® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews